locked
Does HttpClient add header 'Acept-Encoding' is 'gzip, deflate' automatically?

    Question

  • Hi there,

    I using HttpClient to get data from a web server which enabling gzip response data. My code is very simple:

    using (HttpClient httpClient = new HttpClient())
    {
        // To do
        httpResponseMsg = await httpClient.SendRequestAsync(myPOSTRequestMessage);
    ....
    }

    I use a tool to capture http trafiic on my PC, it is Fiddler. And here is what I see:

    Fiddler tool captured HttpClient POST request.

    So does the HttpClient auto add 'Acept-Encoding' header?

    Thanks,

    Vu


    Vu Tran


    • Edited by Vu_Tran Saturday, April 04, 2015 3:44 AM Edit title more meaning
    Saturday, April 04, 2015 3:43 AM

Answers

All replies