http-json-response
makes sending JSON over http a little more convenient
usage
var send = http = http
.. or if you're feeling particularly brazen
var http = httpServerResponseprototypesend = http
...at your own risk, of course.
notes
- adds in
content-type: application/json
header for you send
automatically callsres.end()
.- If the status code is not specified, it defaults to
200 (OK)
.
license
MIT