In "fetch", don't pass a "body" value if there isn't one
This commit is contained in:
parent
1d07783522
commit
dd831b4552
|
|
@ -17,7 +17,7 @@ async function sendAsync(id: number, method: string, requestUri: string, body: s
|
||||||
try {
|
try {
|
||||||
response = await fetch(requestUri, {
|
response = await fetch(requestUri, {
|
||||||
method: method,
|
method: method,
|
||||||
body: body,
|
body: body || undefined,
|
||||||
headers: headersJson ? (JSON.parse(headersJson) as string[][]) : undefined
|
headers: headersJson ? (JSON.parse(headersJson) as string[][]) : undefined
|
||||||
});
|
});
|
||||||
responseText = await response.text();
|
responseText = await response.text();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue