Skip to content

Commit

Permalink
feat(maintenance): Expand non-browser support. (#92)
Browse files Browse the repository at this point in the history
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 <[email protected]>

Co-authored-by: Jeff Cuevas-Koch <[email protected]>
  • Loading branch information
cuevaskoch and Jeff Cuevas-Koch authored Feb 19, 2021
1 parent bb06518 commit 847fbf4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ class Client {
}

const opts = {
headers: {},
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
method,
body,
...rest,
Expand Down

0 comments on commit 847fbf4

Please sign in to comment.