liveBook · Manning

Content negotiation

Content negotiation is the HTTP process by which a client and server select a mutually supported representation format, language, or version.

How 3 Manning books explain it

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
Lets API consumers select useful response formats and languages while retaining a shared operation.
How deep it goes
Explains request and response headers, defaults, localization boundaries, and format trade-offs without detailing negotiation algorithms or unsupported-type responses.
Examples
Uses CSV transaction exports, XML money transfers, translated category labels, and summarized account representations.
What you can do after
Operate/configure it with Accept, Content-Type, and Accept-Language headers to choose supported representations without assuming input and output formats match.

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

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.