Closed bjornharrtell closed 7 years ago
Thanks for this!
I understood the requirements from #100 and #146 as follows:
Content-Type
headerapplication/vnd.api+json
without any media type parametersI don't really see these reflected in this PR though. My understanding of the code is these rules:
GET
and DELETE
requestsapplication/vnd.api+json
without any media type parametersContent-Type
in the diff.4 and 5 don't make much sense to me, because I thought the Accept
header was about the content-type
of the response, not the request. It makes sense to validate it always (if it exists).
If I misunderstood something, please let me know!
You are absolutely correct, for some reason I mixed up these headers logically when taking a stab at this.
I suggest a more simple change to simply let requests through that have no application/vnd.api+json
Accept
header at all. For Content-Type
I'm not sure there is an issue at all.
Reworked as suggested. I hope it makes sense this time.
Looks good! thanks!
My take on https://github.com/joukevandermaas/saule/issues/100 and https://github.com/joukevandermaas/saule/issues/146.