http-request
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -0,1 +1,4 @@ | ||
## v0.6.1 | ||
* Fixed the typo in content-length for Buffer reqBody. | ||
## v0.6.0 | ||
@@ -2,0 +5,0 @@ * Client rewritten almost from scratch for including broader HTTP support. Renamed to http-request to indicate this change. New HTTP method wrappers: DELETE, POST, PUT. |
@@ -260,3 +260,3 @@ 'use strict'; | ||
if (this.options.reqBody instanceof Buffer) { | ||
this.options.headers['content-lenght'] = this.options.reqBody.length; | ||
this.options.headers['content-length'] = this.options.reqBody.length; | ||
} | ||
@@ -263,0 +263,0 @@ |
{ | ||
"name": "http-request", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"main": "./lib/main.js", | ||
@@ -5,0 +5,0 @@ "description": "General purpose HTTP / HTTPS client for node.js. Supports transparent gzip / deflate decoding.", |
@@ -394,3 +394,4 @@ 'use strict'; | ||
headers = { | ||
'x-content-type': req.headers['content-type'] | ||
'x-content-type': req.headers['content-type'], | ||
'x-content-length': req.headers['content-length'] | ||
}; | ||
@@ -397,0 +398,0 @@ |
@@ -33,2 +33,3 @@ 'use strict'; | ||
assert.strictEqual(res.headers['x-content-type'], 'application/x-www-form-urlencoded;charset=utf-8', 'we got back the original content-type header'); | ||
assert.strictEqual(res.headers['x-content-length'], '21', 'we got back the content-length header'); | ||
@@ -60,2 +61,3 @@ done(); | ||
assert.strictEqual(res.headers['x-content-type'], 'application/x-www-form-urlencoded', 'we got back the original content-type header'); | ||
assert.strictEqual(res.headers['x-content-length'], '21', 'we got back the content-length header'); | ||
@@ -88,2 +90,3 @@ done(); | ||
assert.strictEqual(res.buffer.toString(), 'foo=bar&baz=q%20u%20x', 'we got back the parsed request body'); | ||
assert.strictEqual(res.headers['x-content-length'], '266', 'we got back the content-length header'); | ||
@@ -90,0 +93,0 @@ done(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1960532
4046