Created
April 10, 2017 04:15
-
-
Save loinguyenduc101/fc7b9150b8ed09d5f12e1eff4a6e0dad to your computer and use it in GitHub Desktop.
Restful API Versioning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################ Restful API Versioning | |
1. URL based | |
/v1/users | |
/v2/users | |
2. Custom HTTP header | |
make request /v1/users with custome request header: | |
X-API-Version: 1.0 | |
X-API-Version: 2.0 | |
3. Accept header with vendor and version | |
make request /v1/users with accept header: | |
Accept: application/vnd.company.app-v1+json | |
Accept: application/vnd.company.app-v2+json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment