connect-es
connect-es copied to clipboard
Consume body before the connection is closed
This change consumes the response body in case of an error with a non-json content-type for debugging purposes. Without this, it's not possible to see what the server returned on non 200 http responses. We had multiple instances where we needed this (401s, 500s, etc).
Note: If the proposed change makes sense, I can add them to other transports