Windows Azure服務管理版本控制

1.Windows Azure's Service Management Versioning

    Operations provided by the Service Management API may have multiple versions. You must specify the version of an operation that you want to use by setting the x-ms-version request header. Requests without an x-ms-version header will be rejected and return a (400) Bad Request response. If your service calls an older version of an operation, you can choose to continue calling the older version, or modify your code to call a newer version. Any differences in functionality between versions are outlined in the documentation for the API call.

    注:

    Windows Azure是一個公有平臺,所以爲了滿足不同版本的應用提供了不同版本的API,那麼如何去告訴Http請求調用哪一個版本的API呢?上面說設置請求頭的x-ms-version參數。不管你是老版本的還是新版本的,只要你設置了請求頭的x-ms-version參數就可以根據設置的參數調用相應的API.


The x-ms-version request header value must be specified in the format YYYY-MM-DD. 

For example:

Request Headers:
x-ms-version: 2011-02-25


總結:

    雲平臺是一個公共服務的平臺,所以需要保留各個版本的API以滿足所有企業和個人的應用調用需要,同時更好的滿足應用的升級和擴展,調用時只要在請求頭中將x-ms-version參數進行賦值,以便知道用那一個版本的API。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章