如何获取标头值

问题描述:

我如何从WCF的Web API Web方法访问头值?

How can I access header values from a web method in WCF Web API?

您可以尝试这样的:

(使用的System.Web;)

(using System.Web;)

HttpUtility.UrlDecode(HttpContext.Current.Request.Headers["myValue"]);