Skip to main content

URL-Based Content Negotiation

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

Fresher Notes URL-based negotiation chooses the representation from the URL instead of the Accept header: a path extension such as /users.json , or a parameter such as ?format=xml . Current status : since Spring 5.3 the path extension strategy is off and deprecated; the parameter strategy is still supported if you enable it. Why use it : it is easy to try in a browser address bar, where you cannot set an Accept header.

More lessons in Content Negotiation