Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling 204 #112

Open
ASContis opened this issue Jan 22, 2024 · 1 comment
Open

Handling 204 #112

ASContis opened this issue Jan 22, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ASContis
Copy link

Is there any way to handle response with 204 which have empty response (mean no data in response just returning with 204 status code)?

@ASContis ASContis added the question Further information is requested label Jan 22, 2024
@mattpolzin
Copy link
Owner

This library focuses on handling the response body (decoding to errors, data, metadata per the JSON:API specification). Since a 204 response has no response body, there's nothing to decode using this library. The specifics of an implementation for this response code would depend on which networking library you were using, but I would suspect that it is generally not too difficult to handle 204 codes explicitly by not trying to do anything with the response body.

I'm happy to help think through this further, though, especially if I am missing part of the question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants