HTTP response data garbled parsing failed

Error problem: The HTTP response data is garbled and the analysis fails

Solution: The Postman used in the test, when sending the request, the tool automatically adds the "Accept-Encoding: gzip, deflate, br" attribute to the request header (HttpHeader). When this attribute is included in the request, the server will consider the request to be initiated The client can receive gzip compressed content; at first thought it was a "Transfer-Encoding: chunked" problem, but later when using Fiddler to send a request, it could receive the response data and parse it successfully. After comparison, it was suspected to be "Accept-Encoding: "gzip" problem, so after removing the "Accept-Encoding:gzip" from the Postman request header, the response data was successfully parsed.

Guess you like

Origin blog.csdn.net/zhangwenchao0814/article/details/108798068