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
Formatting Response Data #122
Comments
Merged
@danroth27 I fleshed this out a bit. I'm not sure what "Response format URL mappings" means, though. Can you clarify? |
Response format mappings allow you to specify some part of the URI, like a format query string parameter, or a format specific file extension (.xml, .json) as a way to indicate that you would like a specific response format. |
trobinson41
pushed a commit
to trobinson41/Docs
that referenced
this issue
May 26, 2021
Jan 15 - media, initial transform, rate limits, db increment, nav, perf
This was referenced Jan 12, 2022
This was referenced Jan 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ASP.NET MVC -> Models -> Formatting Response Data
Note: Chrome's Accept header includes application/xml by default, so if you enable Xml and you find you're getting it when you hit your endpoint, that's probably why. If accept header has a wildcard (*), which browsers tend to do, then we will assume it's a browser and will send JSON. If you are not respecting browser headers, and there is a wildcard, we will just send JSON (we will act as if there was no Accept header).
Does ASP.NET Core respect q factors? http://stackoverflow.com/questions/8552927/what-is-q-0-5-in-accept-http-headers
YES. Link to RFC and just say we support the spec.
"Content negotiation allows clients to use the accept header to tell the server what formats they accept" (link accept header to RFC)
Reference: https://blogs.msdn.microsoft.com/webdev/2014/11/24/content-negotiation-in-mvc-6-or-how-can-i-just-write-json/
The text was updated successfully, but these errors were encountered: