mirror of
https://github.com/koush/scrypted.git
synced 2026-04-06 08:40:27 +01:00
http-fetch: missing file
This commit is contained in:
@@ -135,7 +135,7 @@ export function createHeadersArray(headers: HeadersInit | undefined): [string, s
|
||||
*/
|
||||
export function createStringOrBufferBody(headers: [string, string][], body: any) {
|
||||
let contentType: string | undefined;
|
||||
if (typeof body === 'object') {
|
||||
if (typeof body === 'object' && !ArrayBuffer.isView(body)) {
|
||||
body = JSON.stringify(body);
|
||||
contentType = 'application/json';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user