Skip to content

Conversation

@cuzzlor
Copy link
Collaborator

@cuzzlor cuzzlor commented Aug 7, 2023

Problem

Currently calling any method of the HttpClient results in an error when the API returns a 204 (no content) response due to this lib always calling response.json()

Solution

Very minimal, rather than making a breaking change and forcing the typing to T | undefined, just return undefined as T.

Consumers can use .post<undefined>() where 204's are expected

@cuzzlor cuzzlor requested a review from boblat August 7, 2023 06:56
@cuzzlor cuzzlor merged commit e2e2491 into main Aug 7, 2023
@cuzzlor cuzzlor deleted the bug/handle-204-no-content branch August 7, 2023 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants