ajax post - I want to change the Accept-Encoding header value

后端 未结 3 1968
醉梦人生
醉梦人生 2021-02-04 11:38

I am using jQuery ajax to call my WCF service with an HTTP POST. The response is GZIP encoded, and this causes problems in my environment. (See this question). If the response i

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 11:41

    I'm not sure that 'none' is a valid option there. I believe if you set the headers to accept encoding 'deflate' rather than 'none', that should sort out your problem.

    e.g.

    headers: { 'Accept-Encoding' : 'deflate' }
    

提交回复
热议问题