Skip to content

Commit

Permalink
Update request.go
Browse files Browse the repository at this point in the history
Request with ContentLength instead of Transfer-Encoding chunked
  • Loading branch information
olivier4576 committed Dec 2, 2020
1 parent 21064b9 commit a49e4fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *Request) setBodyReader(body io.Reader) error {
switch v := body.(type) {
case *strings.Reader:
r.ContentLength = int64(v.Len())
case *bytes.Buffer:
case *bytes.Reader:
r.ContentLength = int64(v.Len())
}
}
Expand Down

0 comments on commit a49e4fb

Please sign in to comment.