Skip to content

encode error #21

@prettyyjnic

Description

@prettyyjnic

if i use your library i got the uncorrect encode return , but i got the correct return while i use the http library

testResp, err := http.Get("http://192.168.142.128/test.php")
if err != nil {
log.Println(err.Error)
return
}
log.Println("test")
bt, _ := ioutil.ReadAll(testResp.Body)
log.Println(string(bt)) // output 1

c := new(http.Client)
req := request.NewRequest(c)

resp, err := req.Get("http://192.168.142.128/test.php")
if err != nil {
    log.Fatalln(err.Error())
} else {
    bt, _ = ioutil.ReadAll(resp.Body)
    log.Println(string(bt)) // out put uncorrect string
}
return

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions