-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When http.createClient is deprecated in node.js v0.8+, the revised source code of node-puser.js is as follows.
Please check it out.
Original:
var client = http.createClient(80, this.domain);
var request = client.request('POST', path, {
'host': this.domain,
'content-type': 'application/json',
'content-length': new Buffer(requestBody).toString('binary').length
});
Revised:
var _options = {
host: this.domain,
port: 80,
path: path,
method: 'POST',
'content-type': 'application/json',
'content-length': new Buffer(requestBody).toString('binary').length
}
var request = http.request(_options, function(res) {});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels