1
0

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

This commit is contained in:
Zef Hemel 2022-07-30 12:57:30 +02:00
parent 3fed032e72
commit 16ba36f52a

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();