Skip to content

fix: be consistent between net/http and httpmock Response.Body#116

Merged
maxatome merged 1 commit into
v1from
response-body
Dec 20, 2021
Merged

fix: be consistent between net/http and httpmock Response.Body#116
maxatome merged 1 commit into
v1from
response-body

Conversation

@maxatome

Copy link
Copy Markdown
Collaborator

If some code wrongly depends on NewStringResponse() &
NewBytesResponse() response body be read ad infinitum, it should be
changed to either recall NewStringResponse() & NewBytesResponse()
before reading again the response body, or use NewBytesResponder() or
NewStringResponder().

Closes #108.

If some code wrongly depends on NewStringResponse() &
NewBytesResponse() response body be read ad infinitum, it should be
changed to either recall NewStringResponse() & NewBytesResponse()
before reading again the response body, or use NewBytesResponder() or
NewStringResponder().

Closes #108.

Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsist behavior between http.Response.Body and httpmock.Response.Body

1 participant