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
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

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.