Skip to content

Instantly share code, notes, and snippets.

@guyellis
Created October 11, 2013 03:01
Show Gist options
  • Save guyellis/6928951 to your computer and use it in GitHub Desktop.
Save guyellis/6928951 to your computer and use it in GitHub Desktop.
Put HTTP headers into HTML <p> element when using NodeJS and Express route.
var headerInfo = "<p>";
for(var header in req.headers) {
headerInfo += header + " = " + req.headers[header] + "<br />";
}
headerInfo += "</p>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment