Skip to content

Instantly share code, notes, and snippets.

@swook
Created January 20, 2013 22:55
Show Gist options
  • Save swook/4582385 to your computer and use it in GitHub Desktop.
Save swook/4582385 to your computer and use it in GitHub Desktop.
Check HTTP Status of URL
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Seon-Wook Park</author>
</meta>
<bindings>
<select itemPath="" produces="JSON">
<inputs>
<key id='url' type='xs:string' paramType='variable' required='true' />
</inputs>
<execute><![CDATA[
var req = y.rest(url).timeout(500).get();
response.object = {
status: req.status,
headers: req.headers,
url: req.url
}
]]></execute>
</select>
</bindings>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment