diff --git a/src/index.ts b/src/index.ts index 4bdc093..a102f28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -105,7 +105,9 @@ function requestToFetchOptions(reqOpts: Options) { // Set body to JSON representation of value options.body = JSON.stringify(reqOpts.json); } else { - if (typeof reqOpts.body !== 'string') { + if (Buffer.isBuffer(reqOpts.body)) { + options.body = reqOpts.body; + } else if (typeof reqOpts.body !== 'string') { options.body = JSON.stringify(reqOpts.body); } else { options.body = reqOpts.body;