mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Sends a JSON body with delete requests to the FastEndpoints endpoints
This commit is contained in:
1 parent
f87fa04df5
commit
351368e7b5
1 file changed
+2
-1
@@ -189,7 +189,8 @@ async function callApiDeleteAsync(url, options = {}) {
|
||||
// make the request
|
||||
const response = await fetch(url, {
|
||||
method: 'DELETE',
|
||||
headers: headers
|
||||
headers: headers,
|
||||
body: '{}' // FastEndpoints parses the JSON body when the content type is application/json, so an empty body would fail to deserialize
|
||||
});
|
||||
if (response.redirected) // if a redirect is requested, perform it
|
||||
window.location.href = response.url;
|
||||
|
||||
Reference in new issue
Block a user