From 147861790bfc4e77fd4f8b9215b8287b5e935d12 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Mon, 27 May 2019 11:27:52 +1000 Subject: [PATCH] Always send application/json as content type in rpc. --- js/modules/loki_rpc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/modules/loki_rpc.js b/js/modules/loki_rpc.js index 19e54b71a..a61422506 100644 --- a/js/modules/loki_rpc.js +++ b/js/modules/loki_rpc.js @@ -106,7 +106,10 @@ const rpc = (address, port, method, params, options = {}) => { method: 'POST', ...options, body: JSON.stringify(body), - headers, + headers: { + 'Content-Type': 'application/json', + ...headers, + }, }; return fetch(url, fetchOptions);