开发者

Link/url-generation in a self-hosted WCF WebApi

开发者 https://www.devze.com 2023-03-26 12:58 出处:网络
What is the开发者_C百科 best strategy to generate links or urls to other resources in a self-hosted WCF WebApi application, without hard-coding something like host or port, etc.

What is the开发者_C百科 best strategy to generate links or urls to other resources in a self-hosted WCF WebApi application, without hard-coding something like host or port, etc.

Is there something like a route-helper?


Currently, AFAIK, there isn't specific support for link/url generation. However, you can access all the required information (e.g. scheme, host, port, uri template) via the description model. See https://pfelix.wordpress.com/2011/05/08/wcf-web-apidescription-model/

0

精彩评论

暂无评论...
验证码 换一张
取 消