Skip to content

415 for DELETE request with no body. #29

Closed
@mathieufrh

Description

@mathieufrh

Your documentation states:

Any request that involves the client sending a JSON:API document in the request is processed by the resource request class. For example, our posts resource will have a PostRequest class.

A client specifies the media type of request content in the Content-Type header. If the client specifies a media-type other than the JSON:API media-type (application/vnd.api+json), they will receive a 415 Unsupported Media Type response.

And from what I understand in the JSON:API standard documentation, the client shouldn't set any Content-Type header if the request does not contain any body (which makes sense).

But if I send a DELETE request, for instance DELETE /api/v1/clients/311 I receive a 415 HTTP error code because the isJsonApifunction of the Http\Requests\FormRequest class in called.

Is it the expected behavior ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions