How to get custom header value? RRS feed

  • Question

  • User-1556678718 posted


    I have a controller and I'd like to get something from the headers, a custom value like X-ABC. How do I read this value in the controller?

     public class bbb : ApiController
            public myResponseMessage Getsomething()
                myResponseMessage msg = new myResponseMessage();
                var req = this.Request;
                var t = req.Headers. ???//I dint know what to put here
                return msg;

    please advice

    Sunday, July 23, 2017 2:31 PM


All replies