File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ async function getHeaders(options: ApiRequestOptions): Promise<Headers> {
19
19
}
20
20
21
21
if (options.body) {
22
- if (isBinary(options.body)) {
22
+ if (isBinary(options.body) || options.body instanceof Stream ) {
23
23
headers.append('Content-Type', 'application/octet-stream');
24
24
} else if (isString(options.body)) {
25
25
headers.append('Content-Type', 'text/plain');
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {
3
3
return getFormData(options.formData) as BodyInit;
4
4
}
5
5
if (options.body) {
6
- if (isString(options.body) || isBinary(options.body) || options.body instanceof Stream)) {
6
+ if (isString(options.body) || isBinary(options.body) || options.body instanceof Stream) {
7
7
return options.body as BodyInit;
8
8
} else {
9
9
return JSON.stringify(options.body);
You can’t perform that action at this time.
0 commit comments