Reputation: 31
Is there any way to extract http header value and pass it to WCF rest service operation at global extension point, e.g. customized IParameterInspector? Thanks in advance.
Upvotes: 3
Views: 3106
Reputation: 14595
Through your WCF service WebOperationContext you can access the current request's http headers like the following:
var request = WebOperationContext.Current.IncomingRequest;
string header = request.Headers[HttpRequestHeader.Cookie];
Upvotes: 3