How APIs Use Content Negotiation for Flexible Responses
from The API Podcast with Fexingo: REST, GraphQL, and Modern Web APIs Hosted by Fexingo
Episode 83 of The API Podcast explores content negotiation in web APIs — how clients and servers agree on the format and structure of responses. Through the lens of the Accept and Content-Type headers, Lucas and Luna break down how a single endpoint can serve JSON, XML, or even vendor-specific media types without breaking existing clients. They discuss real-world trade-offs, including why some APIs limit negotiation to avoid complexity, and how this pattern has evolved with REST and GraphQL. Specific examples include how GitHub's API handles multiple representation formats and how a poorly configured server can accidentally return HTML when a client expects JSON. The episode also touches on how content negotiation interacts with caching and API versioning. No prior episodes have covered this topic, making it a fresh angle for listeners who build or consume APIs. #ContentNegotiation #REST #GraphQL #WebAPIs #AcceptHeader #ContentType #MediaType #API #JSON #XML #GitHubAPI #Technology #APIDesign #WebDevelopment #Backend #FexingoBusiness #BusinessPodcast #TheAPIPodcast Keep every episode free: buymeacoffee.com/fexingo
Embed this episode
No transcript yet.