O'Reilly logo

Building Web Services with Microsoft Azure by Nikhil Sachdeva, Stephen Kaufman, Alex Belotserkovskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Content negotiation

Content negotiation is an HTTP technique to identify the "best available" response for a client request when multiple responses may be available on the server.

Note

The RFC 2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html) specification for HTTP allows server-driven, agent-driven, and transparent negotiations. For the scope of this chapter, we focus on server-driven negotiations.

The negotiation between the client and the server is accomplished through a set of HTTP headers. These header fields are used by the client to express the desired content type or media type, this information is then used by the server to format the response in a way the client can understand:

Field

Description

Accept headers

These specify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required