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

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.

主站蜘蛛池模板: 汉川市| 阳东县| 上高县| 溧水县| 明水县| 马鞍山市| 邓州市| 高密市| 正镶白旗| 五大连池市| 张家川| 德庆县| 额尔古纳市| 伊通| 宣汉县| 屏南县| 东乌| 佛山市| 台南县| 高要市| 循化| 洛宁县| 东宁县| 丰都县| 博湖县| 义乌市| 蓝田县| 库伦旗| 合川市| 额尔古纳市| 禹城市| 兴义市| 榆林市| 靖州| 富蕴县| 伊川县| 罗甸县| 鄂温| 墨玉县| 元阳县| 岐山县|