serialise objects to json before node-fetch

pull/199/head
sachaaaaa 6 years ago
parent 8eac72b60c
commit d3f23db049

@ -131,7 +131,7 @@ class LokiMessageAPI {
}; };
const fetchOptions = { const fetchOptions = {
method: 'POST', method: 'POST',
body, body: JSON.stringify(body),
headers: { headers: {
'X-Loki-EphemKey': 'not implemented yet', 'X-Loki-EphemKey': 'not implemented yet',
}, },
@ -228,7 +228,7 @@ class LokiMessageAPI {
}; };
const fetchOptions = { const fetchOptions = {
method: 'POST', method: 'POST',
body, body: JSON.stringify(body),
headers, headers,
}; };
try { try {

Loading…
Cancel
Save