diff --git a/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/Services/Http.ts b/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/Services/Http.ts index 5edc1a7b74..26b68c7166 100644 --- a/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/Services/Http.ts +++ b/src/Microsoft.AspNetCore.Blazor.Browser.JS/src/Services/Http.ts @@ -17,7 +17,7 @@ async function sendAsync(id: number, method: string, requestUri: string, body: s try { response = await fetch(requestUri, { method: method, - body: body, + body: body || undefined, headers: headersJson ? (JSON.parse(headersJson) as string[][]) : undefined }); responseText = await response.text();