-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(http-client): Rework application/json header
Before, I was adding it as a default to be overridden, but this didn't match the previous behavior closely enough. The old behavior was to return a Blob from `json()` with `content-type: application/json`, which the fetch client would automatically pick up if no header was present. I've removed the default header and instead added a check when there is no content-type header and the body is valid json. To check the json I use `JSON.parse`, which might have performance issues on very big json objects, but unlikely to cause trouble for anyone. closes #90
- Loading branch information
Showing
2 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters