-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why have version in headers and not URLs? #47
Comments
Logging the appropriate version in the logs is also very easy. |
@sujaymansingh additionally, I would argue that path should just be a reference to an object (and the address shouldn't change between versions, in most cases, even if some behavior and/or representation do change). I like that as a rough guide, similarly keeping headers for meta data (of which I would argue version is one part). Changing/releasing versions is difficult no matter what, but we also have some hope that this will make it slightly easier. |
Here is a great blog post about why to prefer headers I just came across: https://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown |
https://github.com/interagent/http-api-design#version-with-accepts-header
What benefits does this have over having the version in the URL? I'm just curious, I'm not a huge advocate of using the version in the URL.
But with the URL, it's easier to see (logs etc) which version is being used.
The text was updated successfully, but these errors were encountered: