How to version and configure WebApi with multiple aliases

落爺英雄遲暮 提交于 2019-12-10 22:28:55

问题


Currently I am do not have any informationabout my WebApi version in url. So all my endpoings looking like this http://mywebapi/api/getsomethig/id

I wan to have verson number in WebApi url as well but also want to keep the current alias. Is there a way I can configure my WebApi like that so it can respond with different aliaes:

  • http://mywebapi/api/getsomethig/id
  • http://mywebapi/api/v2.0/getsomethig/id
  • http://mywebapi/api/v2/getsomethig/id

What is the best approach of doing that?

来源:https://stackoverflow.com/questions/32214673/how-to-version-and-configure-webapi-with-multiple-aliases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!