From 847fbf4dc4ba6f20cab27b11d9df1aafdbe01725 Mon Sep 17 00:00:00 2001 From: Jeff Cuevas-Koch <4649003+cuevaskoch@users.noreply.github.com> Date: Fri, 19 Feb 2021 15:37:24 -0800 Subject: [PATCH] feat(maintenance): Expand non-browser support. (#92) Set default `Content-Type` and `Accept` headers to `application/json` since this is not done automatically in some non-browser environments. Signed-off-by: Jeff Cuevas-Koch Co-authored-by: Jeff Cuevas-Koch --- src/Client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Client.js b/src/Client.js index 9dc8ba7..fd15da3 100644 --- a/src/Client.js +++ b/src/Client.js @@ -94,7 +94,10 @@ class Client { } const opts = { - headers: {}, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, method, body, ...rest,