Skip to content

Instantly share code, notes, and snippets.

@billywhizz
Created March 29, 2012 03:49
Show Gist options
  • Save billywhizz/2233092 to your computer and use it in GitHub Desktop.
Save billywhizz/2233092 to your computer and use it in GitHub Desktop.
node.js url escaping example
var http = require("http");
http.createServer(function (req, res) {
console.log(require("url").parse(req.url, true));
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(80, '0.0.0.0');
curl http://shuttle.owner.net/index?name=abc123+111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment