官术网_书友最值得收藏!

Versioning formats for REST APIs

To allow the client to request a particular API version, there are three common ways you can do this.

It can be done as part of the URI:

https://myserver.com/v1/helloworld 

It can also be done as a query string parameter:

https://myserver.com/helloworld?api-version=1 

Finally, It can be done by using a custom HTTP header:

GET https://myserver.com/helloworld
api-version: 2

Whichever way you implement versioning is up to you and your team, but it should play a big part in your upfront design thinking. Once you have decided on an option stick, to it as providing a consistent and great experience for your consumers should be one of your primary goals.

主站蜘蛛池模板: 安国市| 太保市| 和田市| 闽侯县| 灵寿县| 璧山县| 临江市| 武汉市| 安康市| 渝北区| 客服| 辰溪县| 桦南县| 瑞安市| 宁陕县| 宝鸡市| 崇文区| 邯郸县| 读书| 肥东县| 天津市| 清河县| 麻阳| 太保市| 东莞市| 武隆县| 恩施市| 阳东县| 聂拉木县| 广平县| 平武县| 璧山县| 遂川县| 永嘉县| 温泉县| 钟祥市| 南陵县| 定日县| 金溪县| 贞丰县| 萝北县|