x-echo
v0.9.1
Published
node.js module to echo http request headers and send them back in the response headers
Readme
x-echo
Description
node.js module to echo http request headers
Badges

Installation
npm install x-echoUsage
Server side
Require the module
var xecho = require('x-echo');- Echo all http request headers:
app.use(xecho());- Echo some http request headers:
app.use(xecho(['accept-language', 'user-agent']));- Echo one http request header:
app.use(xecho('accept-language'));X-Echo response headers
All the requested headers will be echoed with lower-case keys and 'x-echo-' prefix:
Cache-Control:no-cache
Connection:keep-alive
Content-Type:text/plain; charset=utf-8
Date:Mon, 11 Aug 2014 06:57:50 GMT
x-echo-accept:text/event-stream
x-echo-accept-language:en-US,en;q=0.8,hu;q=0.6,he;q=0.4
X-Powered-By:ExpressLicense
GNU GENERAL PUBLIC LICENSE
Credits
This module was written by Gavriel Fleischer x-echo
The idea came from: http://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference
Change log
v1.0
- first release.


