问题
How can I access header values from a web method in WCF Web API?
回答1:
You can try something like this:
(using System.Web;)
HttpUtility.UrlDecode(HttpContext.Current.Request.Headers["myValue"]);
来源:https://stackoverflow.com/questions/8238690/how-to-get-header-values