Fix bug where JSON remote function invocations weren't always parsed properly

pull/66/head
Zef Hemel 2022-07-30 12:57:30 +02:00
parent 3fed032e72
commit 16ba36f52a
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ export class HttpSpacePrimitives implements SpacePrimitives {
if (req.headers.get("Content-length") === "0") {
return;
}
if (req.headers.get("Content-type") === "application/json") {
if (req.headers.get("Content-type")?.includes("application/json")) {
return await req.json();
} else {
return await req.text();