Skip to content

Set 'content-type' to 'application/vnd.api+json' as by specs#4

Open
mblackritter wants to merge 1 commit intodbrekalo:masterfrom
mblackritter:header-content-type-fix
Open

Set 'content-type' to 'application/vnd.api+json' as by specs#4
mblackritter wants to merge 1 commit intodbrekalo:masterfrom
mblackritter:header-content-type-fix

Conversation

@mblackritter
Copy link

@dbrekalo: Congrats for this well crafted *JSONAPI mocking solution, it's simply the most well thought solution out there, and I'm rather sure I tried them all. Didn't make use of the in-browser option so far, but that's a smart one and might get handy! 🤩🥳

As the specs require, this PR changes the header content-type from application/json to application/vnd.api+json

I ran into this while setting it up with Orbit JS, which just gave me a vague TypeError: undefined is not an object (evaluating 'document.data') — jsonapi-serializer.js:128, until I found the issue being the content-type set to 'application/json'.

* I generally tend to write JSONAPI, to make it distinkt from all that "something JSON API" out there.

Cheers,
Black

@mblackritter mblackritter changed the title Set 'Content-Type' to 'application/vnd.api+json' as by specs Set 'content-type' to 'application/vnd.api+json' as by specs Jun 11, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.573% when pulling c1c8c47 on mblackritter:header-content-type-fix into 4860279 on dbrekalo:master.

@tolean
Copy link

tolean commented Nov 5, 2024

up. please merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments