Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
retry: set GetBody callback when request body is present
This commit sets the `GetBody` callback when a request body is present. The callback may be used by the underlying HTTP stack eventually to obtain a new copy of the request body. One example are server redirects. In case of a redirect the client has to send the request again - including the request body. In particular, this should also fix the following HTTP/2 error: ``` http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error (*url.Error) ``` Signed-off-by: Andreas Auernhammer <aead@mail.de>
- Loading branch information