Comments (2)
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
If no Accept header field is present, then it is assumed that the client accepts all media types. If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (not acceptable) response.
from api-guidelines.
@bbarry Yes, that's what I said. However, the REST guidelines say (my emphasis):
Per the HTTP guidelines, this is just a hint and responses MAY have a different content type,
such as a blob fetch where a successful response will just be the blob stream as the payload.
However, I've just answered my own question; RFC2616 was obsoleted by RFC 7231 (amongst others), which now says this in Section 5.3.2:
If the header field is present in a request and none of the available representations for the
response have a media type that is listed as acceptable, the origin server can either honor the
header field by sending a 406 (Not Acceptable) response or disregard the header field by
treating the response as if it is not subject to content negotiation.
I'd argue that's bad practice, but it is part of the spec.
from api-guidelines.
Related Issues (20)
- HTTP Return Codes don't mention HTTP HEAD HOT 8
- Vanity url is broken with leading slash HOT 2
- Guidance on response payload with 201
- arbitrary JSON pattern/anti-pattern
- Add guidance for pageable post operations
- Fix content table in the main Graph guidelines. merger enum and evolvable enum patterns
- querying arbitrary number of keys in a dictionary insted HOT 1
- Add clarity to expand requirement
- The 'at' naming convention
- Xbox box 360 live
- Vague guidelines about point query support
- Error message localization HOT 1
- Restrictions for openType
- ??
- _Originally posted by @mmtayyar in https://github.com/CVEProject/cve-schema/issues/283_
- Have guidance for when to use unschematized models, and what patterns we have available for unschematized models
- Why does collection response use `value` property instead of `values` in Azure API guidelines? HOT 2
- Re-examine guidance for including eTag in response to PUT request
- Add guidelines to prefer "flat" over "nested" structures HOT 3
- Revisit response time requirements for non-LRO operations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-guidelines.