Content negotiation
Content negotiation is the HTTP process by which a client and server select a mutually supported representation format, language, or version.
The Design of Web APIs, Second Edition
HTTP content negotiation is the HTTP mechanism by which a client and server select an appropriate representation format or language for a message.
- How it is used
- Selects representations, languages, hypermedia formats, files, or resource models that fit different API consumer needs.
- How deep it goes
- Explains headers, defaults, independent request and response formats, consistency, and trade-offs without specifying exhaustive media-type handling.
- Examples
- Demonstrates CSV transactions, JSON and XML transfers, localized labels, hypermedia formats, and summarized or complete account models.
- What you can do after
- Apply it via HTTP headers to design flexible representations while preserving clear defaults, consumer interoperability, and operation-level consistency.
Read how The Design of Web APIs, Second Edition explains content negotiation →
ASP.NET Core in Action, 3e
Content negotiation is the process by which an HTTP client and server select a representation format for a response based on supported media types and request preferences.
- How it is used
- Uses content negotiation to return controller models in a format an API client can understand.
- How deep it goes
- Explains headers, formatter defaults, browser exceptions, and configuration while deferring custom formatter construction.
- Examples
- Tests a car-list response requested as XML, then shows XML formatter registration and browser Accept configuration.
- What you can do after
- Operate/configure it by adding XML formatters and changing how ASP.NET Core controllers handle browser Accept headers.
Read how ASP.NET Core in Action, 3e explains content negotiation →
Pro ASP.NET Core 7, Tenth Edition
Content negotiation is the process of selecting a response representation by comparing client-specified format preferences with the formats an HTTP server can produce.
- How it is used
- Shapes ASP.NET Core web-service responses to match client-specified representation preferences.
- How deep it goes
- Explains Accept-header behavior, formatter registration, serialization constraints, fallback requests, and 406 handling.
- Examples
- Demonstrates PowerShell requests for XML, wildcard fallback, and PNG, with observed JSON, XML, and 406 responses.
- What you can do after
- Operate/configure ASP.NET Core MVC to add XML output, test Accept preferences, and control unsupported-format behavior.
Read how Pro ASP.NET Core 7, Tenth Edition explains content negotiation →
Related concepts
- Accept headeruses · An Accept header is an HTTP request header that specifies the media types a client can process in the response, optionally indicating preferences.
- Accept-Languageuses · Accept-Language is an HTTP request header that communicates the natural languages or language variants preferred or accepted by a client.
- controllerused by · A controller is a software component or architectural role that receives inputs or requests and coordinates their handling by other parts of an application.
- operationused by · An operation is an action or computation performed by or through a system, object, or interface, often producing a result or effect.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


