Skip to content

Instantly share code, notes, and snippets.

@joshgillies
Last active August 29, 2015 14:26
Show Gist options
  • Save joshgillies/81623570afcca668421c to your computer and use it in GitHub Desktop.
Save joshgillies/81623570afcca668421c to your computer and use it in GitHub Desktop.
module['exports'] = function pingtMtWellington (hook) {
var req = require('request')
var store = hook.datastore
req.head('http://www.rosebay.tased.edu.au/webcam/large.jpg', function (err, res, body) {
if (err) {
console.log(err.messsage)
return hook.res.end(err.messsage)
}
if (!res.headers['last-modified']) {
return hook.res.end('header \'last-modified\' not found in ' + JSON.stringify(res.headers))
}
console.log(JSON.stringify(res.headers))
hook.res.end(JSON.stringify(res.headers))
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment