Skip to content

Instantly share code, notes, and snippets.

@patheticpat
Created April 21, 2011 12:30
Show Gist options
  • Save patheticpat/934384 to your computer and use it in GitHub Desktop.
Save patheticpat/934384 to your computer and use it in GitHub Desktop.
yql table for retrieveing some headers
<?xml version="1.0" encoding="UTF-8" ?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<sampleQuery>select * from {table} where url="http://developer.yahoo.com/"</sampleQuery>
<description>Retrieve content-type and content-length for URLs</description>
<author>Michael Kaiser</author>
</meta>
<bindings>
<select itemPath="result" produces="XML">
<inputs>
<key id="url" type="xs:string" paramType="variable" required="true"/>
</inputs>
<execute><![CDATA[
var results = y.rest(url).get();
response.object = {url: url, headers: results.headers};
]]></execute>
</select>
</bindings>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment