Also print intercepted responses
This commit is contained in:
1 parent
05dbe23563
commit
efb12f41b2
1 file changed
+2
@@ -85,6 +85,7 @@ func unmarshalResponseBody(r *http.Response, target interface{}) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
Log.Debugf("->responseBody: %s", body)
|
||||
if err := r.Body.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -100,6 +101,7 @@ func marshalResponseBody(r *http.Response, body interface{}) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
Log.Debugf("<-responseBody: %s", newBody)
|
||||
r.Body = ioutil.NopCloser(bytes.NewReader(newBody))
|
||||
r.ContentLength = int64(len(newBody))
|
||||
// Stop it being chunked, because that hangs
|
||||
|
||||
Reference in new issue
Block a user