You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Do not close body
session := requests.R().SetDoNotCloseBody(true)
resp, err := session.Get(ts.URL + "/get")
if err == nil {
var json map[string]interface{}
err = resp.Json(&json)
t.Logf("response json:%#v\n", json)
}
if err != nil {
t.Fatal(err)
}
resp.R.Body.Close() // close body manually
it has the built-in close
The text was updated successfully, but these errors were encountered: