Created
April 21, 2011 12:30
-
-
Save patheticpat/934384 to your computer and use it in GitHub Desktop.
yql table for retrieveing some headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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