Skip to content

Media type negotiation cleanup #673

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

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Content Negotiation: add non-normative note about serving JSON API as…
… json
  • Loading branch information
ethanresnick committed May 27, 2015
commit a6a051cd61a5f080ce0629a830ce94f178e8974e
7 changes: 7 additions & 0 deletions format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ Servers **MUST NOT** send responses with the `application/vnd.api+json` media
type if the client has not indicated, using its `Accept` header, that it can
understand this format.

> Note: If a client's `Accept` header indicates that it accepts standard JSON
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should encourage this. I believe that this minor wheel greasing will actually be a disservice to clients. If they are required to provide the media type they accept, I suspect they will be more likely to find out what it is before consuming the data from a json-api service blindly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, I intend to provide a formatter for text/html in Endpoints that will return the response in a browser friendly format (tables, hyperlinks, etc).

but not the JSON API media type, the server may choose serve it a JSON API
document identified as `application/json`. If the server does so, is not
considered to be sending "JSON API data" for the purposes of the requirement
above, but rather simple JSON data, and the client cannot rely on any of the
rules laid out in this specification.

Clients **MUST** ignore any parameters for the `application/vnd.api+json`
media type received in the `Content-Type` header of response documents.

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy