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

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.

主站蜘蛛池模板: 师宗县| 普宁市| 新龙县| 阿拉善盟| 女性| 光山县| 遂昌县| 九寨沟县| 田林县| 太谷县| 西乌珠穆沁旗| 法库县| 习水县| 黑山县| 平南县| 清苑县| 灌阳县| 宕昌县| 竹溪县| 马尔康县| 乌恰县| 寻乌县| 蓬莱市| 陆良县| 茶陵县| 分宜县| 沂水县| 松江区| 沙田区| 宁晋县| 家居| 孟津县| 永泰县| 饶河县| 武乡县| 泽普县| 巫山县| 始兴县| 湘乡市| 广西| 墨竹工卡县|