Browse Source
Only check if opts.body exists and doesn't have a falsy value
master
Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: EF804E3FF4BBA8AB
1 changed files with
1 additions and
1 deletions
-
lib/agent.js
|
|
@ -65,7 +65,7 @@ export default class Agent { |
|
|
|
opts.body = JSON.stringify(body) |
|
|
|
} |
|
|
|
|
|
|
|
if (opts.body !== null && typeof body.pipe !== 'function') { |
|
|
|
if (opts.body && typeof body.pipe !== 'function') { |
|
|
|
opts.headers['Content-Length'] = Buffer.byteLength(opts.body) |
|
|
|
} |
|
|
|
|
|
|
|