Developers Guide to GPG and YubiKey

Tutorial: API clients have different capabilities and needs! Learn how to make your server select the correct languages, media types, and compression!


Content negotiation allows for an HTTP server to respond to different types of clients. Many modern clients expect a JSON response, but there may be a need to format responses differently, maybe XML for older clients or a binary format for newer ones. Content negotiation is the mechanism used to solve that problem and others, such as dealing with multiple languages and even compressing HTTP requests.