|
|
|
|
|
by stephenr
949 days ago
|
|
> when in practice do you want to do that? Well as you're quite interested in APIs: the accept header is a fantastic way to version a REST API, and even has a built in way to handle clients that can talk to multiple versions of the same API. Your app could request just 'application/vnd.foo.v1+json' from an API and if it's a centralised service that may be fine. If the API your app talks to is something that's deployed to customers, or rolls out to regions incrementally or whatever, and thus can be at different versions, you need a way to handle that: the Accept header has you covered. |
|
The Accept header does nothing that URLs can not.