diff --git a/lib/agent.js b/lib/agent.js index 477ff70..17f6fb3 100644 --- a/lib/agent.js +++ b/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) }