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 format web API controller responses for clients with different media-type needs.
How deep it goes
Explains header preferences, formatter defaults, XML registration, and configurable special cases, while deferring custom formatter creation.
Examples
Uses a car-list controller, weighted Accept header, XML formatter registration, and browser-header configuration.
What you can do after
Operate/configure ASP.NET Core controller formatters to support XML and adjust browser Accept-header handling.

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 →

What to know first

Related concepts

Questions about content negotiation

What is content negotiation?

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

Which Manning books explain content negotiation?

The Design of Web APIs, Second Edition, ASP.NET Core in Action, 3e and Pro ASP.NET Core 7, Tenth Edition.

What should I know before learning content negotiation?

Manning books that teach content negotiation usually introduce JSON, HTTP, MIME type and xml first.

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.