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

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.

主站蜘蛛池模板: 镇康县| 永登县| 慈溪市| 屯留县| 礼泉县| 凤翔县| 通州市| 桐柏县| 龙里县| 固原市| 鄱阳县| 深圳市| 嵩明县| 北碚区| 茌平县| 丽江市| 电白县| 来宾市| 花垣县| 胶州市| 正安县| 双峰县| 安图县| 宁夏| 石林| 登封市| 长岛县| 威海市| 四平市| 达州市| 鞍山市| 独山县| 怀来县| 五原县| 漳浦县| 麻城市| 故城县| 大悟县| 康马县| 凌海市| 咸宁市|