コピー {
"icons" : [
"http://example.com/favicon.ico" ,
"http://example.com/apple-touch-icon.png"
]
}
コピー import requests
response = requests . get ( 'https://grape.mixeder.net/api-fav/output.png' , params = { 'domain' : 'example.com' })
print (response. json ())
コピー <? php
$response = file_get_contents ( 'https://grape.mixeder.net/api-fav/output.png?domain=example.com' ) ;
print_r ( json_decode ( $response , true )) ;
?>
コピー curl -X GET "https://grape.mixeder.net/api-fav/output.png?domain=example.com"
コピー const https = require ( 'https' );
https .get ( 'https://grape.mixeder.net/api-fav/output.png?domain=example.com' , (res) => {
let data = '' ;
res .on ( 'data' , (chunk) => {
data += chunk;
});
res .on ( 'end' , () => {
console .log ( JSON .parse (data));
});
}) .on ( 'error' , (err) => {
console .error ( 'エラー:' , err);
});
コピー 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)
}
コピー 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