mirror of
https://git.coolaj86.com/coolaj86/request.js
synced 2025-04-21 23:00:36 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
961740ffa0 | |||
3aac42d08b |
3
index.js
3
index.js
@ -120,6 +120,9 @@ function handleResponse(resp, opts, cb) {
|
|||||||
resp.body = '';
|
resp.body = '';
|
||||||
}
|
}
|
||||||
resp._bodyLength = 0;
|
resp._bodyLength = 0;
|
||||||
|
resp.once('error', function (err) {
|
||||||
|
cb(err, resp, resp.body);
|
||||||
|
});
|
||||||
resp.on('readable', function () {
|
resp.on('readable', function () {
|
||||||
var chunk;
|
var chunk;
|
||||||
while ((chunk = resp.read())) {
|
while ((chunk = resp.read())) {
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@root/request",
|
"name": "@root/request",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"lockfileVersion": 1
|
"lockfileVersion": 1
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@root/request",
|
"name": "@root/request",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"description": "A lightweight, zero-dependency drop-in replacement for request",
|
"description": "A lightweight, zero-dependency drop-in replacement for request",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user