Conceptual
Login

Content Negotiation in DRF

DRF selects a renderer by matching the request's Accept header (or format suffix) against the view's renderer_classes, then serializes Response.data at the last moment — JSONRenderer for machine clients, BrowsableAPIRenderer producing the HTML debug UI for the same endpoint. Parsers mirror this on input, chosen by Content-Type.

This Concept is waiting for its first lesson!

DRF selects a renderer by matching the request's Accept header (or format suffix) against the view's renderer_classes, then serializes Response.data at the last moment — JSONRenderer for machine clients, BrowsableAPIRenderer producing the HTML debug UI for the same endpoint. Parsers mirror this on input, chosen by Content-Type.

Are you a teacher? Sign in to start contributing.

Sign In