Skip to content

Instantly share code, notes, and snippets.

@heapwolf heapwolf/42.js
Created Aug 7, 2012

Embed
What would you like to do?
http/requests
var inspect = require('util').inspect;
require('http').createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
var inspected = {
'url': req.url,
'method': req.method,
'headers': req.headers
};
res.end(inspect(inspected));
}).listen(4001);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.