Fix saving big payloads.

This commit is contained in:
Paulo Gustavo Veiga 2022-02-18 14:06:33 -08:00
parent 98126049d3
commit 72018cf6b0

View File

@ -77,7 +77,6 @@ class RESTPersistenceManager extends PersistenceManager {
// Blob helps to resuce the memory on large payload. // Blob helps to resuce the memory on large payload.
body: new Blob([JSON.stringify(data)], { type: 'text/plain' }), body: new Blob([JSON.stringify(data)], { type: 'text/plain' }),
headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' }, headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' },
keepalive: true,
}, },
).then(async (response: Response) => { ).then(async (response: Response) => {
if (response.ok) { if (response.ok) {
@ -129,7 +128,6 @@ class RESTPersistenceManager extends PersistenceManager {
{ {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' }, headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' },
keepalive: true,
}); });
} }