[Solved] How do I obtain a response header value when making a REST call via WCF?

The simplest way is to change the interface declaration such that the method returns System.ServiceModel.Channels.Message:

[WebInvoke(Method = "POST", UriTemplate = @"whatever")]
Message CoolMethod(InputContainer input);

then once method invokation is complete you get a Message object which contains the HTTP response with the headers:

var invokationResult = service.CoolMethod( new InputContainer() );
var properties = message.Properties;
var httpResponse = 
var responseHeaders = httpResponse.Headers;
var coolHeader = reponseHeaders["x-some-cool-header"];

Read more here: Source link