Last active
August 29, 2015 14:26
-
-
Save joshgillies/81623570afcca668421c to your computer and use it in GitHub Desktop.
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
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