Closed Ray-Eldath closed 2 years ago
Hi, it seems 5203e0b is no longer needed since a88cbab. I have to do some tests to check potential edge cases.
You can work this problem around by providing your own response body:
resp := httpmock.NewStringResponse(200, "")
resp.Body = io.NopCloser(strings.NewReader("test"))
httpmock.RegisterResponder("GET", "http://127.0.0.1:12350/test_01",
httpmock.ResponderFromResponse(resp))
Thanks, I'll check it out. :wink:
Hi @Ray-Eldath, #116 should fix the problem, could you check on your side please?
Yes, now the second read returns empty string, as consistent with http.Response. :smile_cat:
This will print
test
twice, but use a real server it will only print once since you can't read twice from ahttp.Body
.