😬 Actually send the request body
This commit is contained in:
@@ -378,8 +378,9 @@
|
|||||||
|
|
||||||
// If the request has a request body, we want to ensure Content-Length and
|
// If the request has a request body, we want to ensure Content-Length and
|
||||||
// Content-Type are sent.
|
// Content-Type are sent.
|
||||||
|
let requestBody;
|
||||||
if (this.hasRequestBody) {
|
if (this.hasRequestBody) {
|
||||||
const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
|
requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
|
||||||
|
|
||||||
Object.assign(headers, {
|
Object.assign(headers, {
|
||||||
'Content-Length': requestBody.length,
|
'Content-Length': requestBody.length,
|
||||||
@@ -406,7 +407,8 @@
|
|||||||
method: this.method,
|
method: this.method,
|
||||||
url: this.url + this.path + this.queryString,
|
url: this.url + this.path + this.queryString,
|
||||||
auth,
|
auth,
|
||||||
headers
|
headers,
|
||||||
|
data: requestBody
|
||||||
});
|
});
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user