Skip to main content

Parameter-Based Content Negotiation

Learn Parameter-Based Content Negotiation (Content Negotiation, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Parameter-based negotiation lets the client choose the response format with a query parameter such as /users?format=json instead of the Accept header. Why use it : a browser address bar or a plain link cannot set the Accept header, but it can add a query parameter. Enable it with configurer.favorParameter(true) in configureContentNegotiation ; the default parameter name is format .

More lessons in Content Negotiation