After the go request packet sends the request, the return code appears garbled?

  golang, question
// test
 package main
 
 import (
 "io/ioutil"
 "net/http"
 "os"
 
 "github.com/mozillazg/request"
 )
 
 func main() {
 c := &http.Client{}
 req := request.NewRequest(c)
 resp, _ := req.Get("http://segmentfault.com/")
 defer resp.Body.Close() // **Don't forget close the response body**
 body, _ := ioutil.ReadAll(resp.Body)
 fr, _ := os.Create("request.html")
 fr.Write(body)
 res, _ := http.Get("http://segmentfault.com/")
 truebody, _ := ioutil.ReadAll(res.Body)
 res.Body.Close()
 ft, _ := os.Create("get.html")
 ft.Write(truebody)
 
 }

Request package request result
request包请求结果

Http.get request output results
http.get请求输出结果

There is a garbled code and all the returned objects are response objects. how can one garbled code and one normal code be solved

By default, github.com/mozillazg/request is added to the Header of request.

Content-Encoding:[gzip]

So the returned body is not text/html, but a compressed binary. So request.html is a mess.
Add this paragraph to the code:

c := &http.Client{}
 req := request.NewRequest(c)
 //The appended code starts = = = = = = = = = = = = = = = = = = = = = = =
 req.Headers = map[string]string{
 "Accept-Encoding": "",
 }
 //End of appended code = = = = = = = = = = = = = = = = = = = = = = =
 resp, _ := req.Get("http://segmentfault.com/")