Closed tttturtle-russ closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.67%. Comparing base (
82ae758
) to head (24ae356
). Report is 13 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jeevatkm OK, I will close this PR and create a new one with curl middleware added.
The `TestGenerateExecutedCurl` failure started after I merged from branch `v2` to branch `main`. It needs to investigate why it's failing.
Originally posted by @jeevatkm in https://github.com/go-resty/resty/issues/827#issuecomment-2323726014
Hi jeevatkm, I've found the reason why the test case failed. In https://github.com/go-resty/resty/blob/6d941ac6f1ed35557b6fb3fb41cf74beeb9be2f0/client.go#L1601
Do
method will read thereq.RawRequest.Body
and make it empty. When generating curl body it will read an empty string, and that's why it failed.This commit offers a temporary solution to this problem, I think the ultimate solution is to add a
Clone
method inRequest
, as #718 describes.