Skip to content

Commit

Permalink
try defining GetBody
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit4tech committed Oct 22, 2024
1 parent 9015b1b commit 5ebe0f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transport/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func (h *httpTransport) Call(ctx context.Context, r *Request) (*Response, error)
return nil, err
}

req.GetBody = func() (io.ReadCloser, error) {
return io.NopCloser(bytes.NewReader(r.Body)), nil
}
resp, err := h.client.Do(req.WithContext(ctx))
if err != nil {
return nil, err
Expand Down

0 comments on commit 5ebe0f8

Please sign in to comment.