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.

Revisions

  1. patheticpat revised this gist Apr 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion get_head.xml
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@
    </inputs>
    <execute><![CDATA[
    var results = y.rest(url).get();
    response.object = {url: url, type: results.headers.content-type, length: results.headers.content-length};
    response.object = {url: url, headers: results.headers};
    ]]></execute>
    </select>
    </bindings>
  2. patheticpat revised this gist Apr 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion get_head.xml
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@
    </inputs>
    <execute><![CDATA[
    var results = y.rest(url).get();
    response.object = {url: url, "content-type": results.headers.content-type, "content-length": results.headers.content-length};
    response.object = {url: url, type: results.headers.content-type, length: results.headers.content-length};
    ]]></execute>
    </select>
    </bindings>
  3. patheticpat revised this gist Apr 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion get_head.xml
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@
    </inputs>
    <execute><![CDATA[
    var results = y.rest(url).get();
    response.object = {url: url, content-type: results.headers.content-type, content-length: results.headers.content-length};
    response.object = {url: url, "content-type": results.headers.content-type, "content-length": results.headers.content-length};
    ]]></execute>
    </select>
    </bindings>
  4. patheticpat revised this gist Apr 21, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion get_head.xml
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    <meta>
    <sampleQuery>select * from {table} where url="http://developer.yahoo.com/"</sampleQuery>
    <description>Retrieve content-type and content-length for URLs</description>
    <author>Peter Cowburn</author>
    <author>Michael Kaiser</author>
    </meta>
    <bindings>
    <select itemPath="result" produces="XML">
  5. patheticpat created this gist Apr 21, 2011.
    19 changes: 19 additions & 0 deletions get_head.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <?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>Peter Cowburn</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, content-type: results.headers.content-type, content-length: results.headers.content-length};
    ]]></execute>
    </select>
    </bindings>
    </table>