-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle empty response bodies (#239)
There are cases, such as a HEAD request, where the response body will have a JSON content type but the body will be empty (i.e. an empty string). This is technically valid JSON but is not parsable into an object, so the code throws an exception. This commit adds specific handling for this scenario, as well as a couple of test cases Signed-off-by: Dustin Popp <[email protected]>
- Loading branch information
Showing
2 changed files
with
49 additions
and
1 deletion.
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