node-http
Unify http interface in Node.
Installation
npm install node-http
API
var NodeHttp = ;var nodeHttp = ;
.url(String address)
.header(String name, String value)
.data(Mix data)
.method(String name)
.on(String event, Function callback)
.off(String event, Function callback)
.complete(Function callback)
.success(Function callback)
.fail(Function callback)
.GET(String address, [Function onComplete], [Function onError])
.POST(String address, Mix data, [Function onComplete], [Function onError])
.request(Object options, [Function onComplete], [Function onError])
Events
'complete'
'success'
'fail'
'buffer'
nodeHttp;
status code
nodeHttp;
status name
nodeHttp; nodeHttp;
Todo
- parse
charset
from html and content-type header
License
MIT