We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39ee099 commit 156e237Copy full SHA for 156e237
lib/request.js
@@ -93,7 +93,7 @@ function Request (options) {
93
})
94
95
// we keep both payload and body for compatibility reasons
96
- var payload = options.payload || options.body || null
+ let payload = options.payload || options.body || null
97
if (payload && typeof payload !== 'string' && !(typeof payload.resume === 'function') && !Buffer.isBuffer(payload)) {
98
payload = JSON.stringify(payload)
99
this.headers['content-type'] = this.headers['content-type'] || 'application/json'
0 commit comments