Commit af2d25ef authored by wangmingming's avatar wangmingming

gzip解压缩问题

parent ca180b13
......@@ -90,7 +90,7 @@ func (c *Client) GetSessionCookies() map[string]string {
func (c *Client) GetText() string {
defer c.Response.Body.Close()
//http.DecompressBody(c.Response)
http.DecompressBody(c.Response)
rb, _ := io.ReadAll(c.Response.Body)
return string(rb)
}
......@@ -98,8 +98,9 @@ func (c *Client) GetText() string {
func (c *Client) GetRespUrl() string {
location, err := c.Response.Location()
if err != nil {
return ""
return c.uri.String()
}
return location.RequestURI()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment