HEAD
a un servidor web para una URL. La aplicación, que sigue el estándar REST y devuelve la información en JSON, está disponible en json-head.appspot.com.Dos ejemplos:
- http://json-head.appspot.com/?url=http://www.google.com/
{ "status_code": 200, "ok": true, "headers": { "Content-Length": "0", "Via": "HTTP\/1.1 GWA", "Set-Cookie": "PREF=ID=0a98e4d9becd0aba:TM=1217346285:LM=1217346285:S=Gl6xa2hh9AUbijTY; expires=Thu, 29-Jul-2010 15:44:45 GMT; path=\/; domain=.google.com", "X-Google-Cache-Control": "remote-fetch", "Server": "gws", "Cache-Control": "private, max-age=0", "Date": "Tue, 29 Jul 2008 15:44:45 GMT", "Content-Type": "text\/html; charset=ISO-8859-1", "Expires": "-1" } }
- http://json-head.appspot.com/?url=http://www.yahoo.com/&callback=foo
foo({ "status_code": 200, "ok": true, "headers": { "Via": "HTTP\/1.1 GWA", "Content-Encoding": "gzip", "Accept-Ranges": "bytes", "X-Google-Cache-Control": "remote-fetch", "Vary": "User-Agent", "Last-Modified": "Tue, 29 Jul 2008 15:27:23 GMT", "Connection": "close", "Cache-Control": "private", "Date": "Tue, 29 Jul 2008 15:44:59 GMT", "P3P": "policyref=\"http:\/\/p3p.yahoo.com\/w3c\/p3p.xml\", CP=\"CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV\"", "Content-Type": "text\/html; charset=utf-8", "X-XRDS-Location": "http:\/\/open.login.yahooapis.com\/openid20\/www.yahoo.com\/xrds" } })
callback
.
No hay comentarios:
Publicar un comentario