1

How can I get a header from a Message request object? I don't want to iterate through the Headers to find the header needed. Can I do something like .get('auth')?

public class MessageInspector : IDispatchMessageInspector
{
    public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
    {
        var headers = request.Headers;
        return null;
    }
// ...
el_pup_le
  • 11,711
  • 26
  • 85
  • 142
  • 1
    Are you looking for SOAP headers, or HTTP headers? If HTTP, [this answer](https://stackoverflow.com/a/18970405/6741868) could help you, otherwise look into [this one](https://stackoverflow.com/a/2444901/6741868). – Keyur PATEL Jun 23 '17 at 07:57

0 Answers0