Skip to content

Handling 204 #112

Open
Open

Description

@ASContis

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

Activity

  1. added
    question
    on Jan 22, 2024
  2. mattpolzin commented on Jan 22, 2024

    @mattpolzin
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions