开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜