Skip to content

Instantly share code, notes, and snippets.

@loinguyenduc101
Created April 10, 2017 04:15
Show Gist options
  • Save loinguyenduc101/fc7b9150b8ed09d5f12e1eff4a6e0dad to your computer and use it in GitHub Desktop.
Save loinguyenduc101/fc7b9150b8ed09d5f12e1eff4a6e0dad to your computer and use it in GitHub Desktop.
Restful API Versioning
################ 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