Skip to content

Commit

Permalink
Append string-type bodies to the modified request
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Nov 16, 2022
1 parent 678ed28 commit 1aecfc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RESTDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ export abstract class RESTDataSource {
} else if (!modifiedRequest.headers['content-type']) {
modifiedRequest.headers['content-type'] = 'application/json';
}
}
} else if (typeof request.body === 'string') {
modifiedRequest.body = request.body;
}

if (this.willSendRequest) {
await this.willSendRequest(modifiedRequest);
Expand Down

0 comments on commit 1aecfc7

Please sign in to comment.