Skip to content

Instantly share code, notes, and snippets.

@dylancwood
Last active August 29, 2015 14:14
Show Gist options
  • Save dylancwood/e4943536a62d9cd2bbc5 to your computer and use it in GitHub Desktop.
Save dylancwood/e4943536a62d9cd2bbc5 to your computer and use it in GitHub Desktop.
Quick server to test whether http module automatically decodes url
var http = require('http');
var server = http.createServer();
server.on('request', function(req, res) {
console.log(req.url);
res.end();
});
server.listen(8123);
/**
* run this script with `node testserver.js`
* navigate to localhost:8123/foo/b+ar/sp ace
* check console output
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment