fix: only send Content-Type header to proxy if body content is sent (#2536)

This commit is contained in:
Andreas Fink
2022-10-20 15:30:31 -05:00
committed by GitHub
parent cedf75f28e
commit 7e9d42d7f8
+1 -1
View File
@@ -50,7 +50,7 @@ export async function runMethod<T = any>(
body: body ? JSON.stringify(body) : undefined,
headers: {
Authorization: rest.secretKey,
"Content-Type": "application/json",
"Content-Type": body ? "application/json" : undefined,
},
method,
});