Reputation: 15197
Use case:
Let's say we have www.example.org/statistics/
- with text/json
it responses with JSON representation of raw data, with text/html
it gives representation for human beings, with beauty, graphs, interactivity etc.
Is this good practice?
Upvotes: 0
Views: 53
Reputation: 78132
Yes, it's called Content Negotiation and it's great way to keep your URLs nice and tidy.
Upvotes: 2