-
-
Notifications
You must be signed in to change notification settings - Fork 158
Get requests REQUIRE application/vnd.api+json
request header
#774
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
Comments
I believe your observations are not correct. Omitting an Accept header works, but sending one or multiple that are all incompatible (for example text/html, which browsers may use), the HTTP protocol states to respond with an error if none of the requested media types are available. This is called content negotiation. |
I’m using postman for development now which I probably should have been doing in the first place but this was definitely a breaking change somewhere along the lines I’m sure of it
…On 26 May 2020, 20:31 +0100, Bart Koelman ***@***.***>, wrote:
I believe your observations are not correct. Omitting an Accept header works, but sending one or multiple that are all incompatible (for example text/html, which browsers may use), the HTTP protocol states to respond with an error if the requested media type is not available (this is called content negotiation).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yes, there was no content negotiation happening before. Now you can send headers like application/* which would match too. This was addressed in #731. I'll add it to the list of changes, |
Cool. So long as it’s explainable that’s good for me haha - otherwise I spin my wheels trying to figure out why :)
…On 26 May 2020, 20:36 +0100, Bart Koelman ***@***.***>, wrote:
Yes, there was no content negotiation happening before. Now you can send headers like application/* which would match too. This was addressed in #731. I'll add it to the list of changes,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I'm getting the same response while specifying in postman the contentType 'application/json'. What do I need to do to accept that type of input formatter in the post. I would also need to have the ability to send the body like this. { |
@wayne-o We fixed a bug in v4.1.1 which makes GET requests work in Chrome now, because Chrome includes @fgm1477 If you don't want to comply with the json:api specification (which requires all messages be encoded using application/vnd.api+json media type and requires a fixed body format instead of free-format json), then this library does not fit your needs. Our goal is to implement the spec correctly, not make up our own. |
Hi
Yep I noticed this the other day :)
W
On Sun, 11 Apr 2021 at 09:09, Bart Koelman ***@***.***> wrote:
@wayne-o <https://github.com/wayne-o> We fixed a bug in v4.1.1 which
makes GET requests work in Chrome now, because Chrome includes */* in its
list of Accept headers, which matches anything. We failed to properly parse
such a comma-separated list in the past.
@fgm1477 <https://github.com/fgm1477> If you don't want to comply with
the json:api specification (which requires all messages be encoded using
application/vnd.api+json media type and requires a fixed body format
instead of free-format json), then this library does not fit your needs.
Our goal is to implement the spec correctly, not make up our own.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#774 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLPDFH7WB3CSKE4W7YW5TTIFKL3ANCNFSM4NKGUDVA>
.
--
…____________________
*Wayne Douglas*
Co-founder & Architect
*highstreet.ly <https://highstreet.ly/>*
Mobile: 07508 215459
------------------------------------
____________________
|
Description
According to this: #596 (comment)
GET requests should not require
application/vnd.api+json
headerMaking a request to the reports example using a browser - so no
application/vnd.api+json
header - returns the following error:The text was updated successfully, but these errors were encountered: