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
r.HTTPRequest.Body = body
r.HTTPRequest.GetBody = r.getNextRequestBody
}
why set http requet body and GetBody same object,is not the http request GetBody specification
// GetBody defines an optional func to return a new copy of
// Body. It is used for client requests when a redirect requires
// reading the body more than once. Use of GetBody still
// requires setting Body.
//
// For server requests, it is unused.
GetBody func() (io.ReadCloser, error)
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
GetBody Can Read repeatedly
Current Behavior
requestBody, err := req.HTTPRequest.GetBody()
if err != nil {
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
func (r *Request) ResetBody() {
body, err := r.getNextRequestBody()
if err != nil {
r.Error = awserr.New(ErrCodeSerialization,
"failed to reset request body", err)
return
}
}
why set http requet body and GetBody same object,is not the http request GetBody specification
Regression Issue
Expected Behavior
GetBody Can Read repeatedly
Current Behavior
requestBody, err := req.HTTPRequest.GetBody()
if err != nil {
read the GetBody,the http body buf will to be nil
Reproduction Steps
func TestRequest_FollowPUTRedirects(t *testing.T) {
const bodySize = 9
}
can test this function
Possible Solution
No response
Additional Information/Context
No response
SDK version used
main
Environment details (Version of Go (
go version
)? OS name and version, etc.)1.18
The text was updated successfully, but these errors were encountered: