We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 130953e commit ebb8e9bCopy full SHA for ebb8e9b
1 file changed
core/packages/teeny-request/src/index.ts
@@ -105,7 +105,9 @@ function requestToFetchOptions(reqOpts: Options) {
105
// Set body to JSON representation of value
106
options.body = JSON.stringify(reqOpts.json);
107
} else {
108
- if (typeof reqOpts.body !== 'string') {
+ if (Buffer.isBuffer(reqOpts.body)) {
109
+ options.body = reqOpts.body;
110
+ } else if (typeof reqOpts.body !== 'string') {
111
options.body = JSON.stringify(reqOpts.body);
112
113
options.body = reqOpts.body;
0 commit comments