package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
resp, err := http.Get("https://grape.mixeder.net/api-fav/output.png?domain=example.com")
if err != nil {
log.Fatalln(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatalln(err)
}
var result map[string]interface{}
if err := json.Unmarshal(body, &result); err != nil {
log.Fatalln(err)
}
fmt.Println(result)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://grape.mixeder.net/api-fav/output.png?domain=example.com')
response = Net::HTTP.get(uri)
data = JSON.parse(response)
puts data