requests / toolbelt

A toolbelt of useful classes and functions to be used with python-requests
https://toolbelt.readthedocs.org
Other
999 stars 186 forks source link

Fix implementation error #318

Closed ghost closed 3 years ago

ghost commented 3 years ago

Error details: Whenever we call the utils.dump.dump_response with the parameters, we expect it to dump the response only.

In the current implementation(before this fix), it dumped both the request and the response, we dont want that.

This "error" has now been fixed with this commit by removing the line that dumps the request in the corresponding function.

ghost commented 3 years ago

Also, we should probably removed the "request_prefix" option in the function because we dont require it anymore.

I forgot to remove it in this PR

sigmavirus24 commented 3 years ago

The docstring clearly defines that it's dumping the "request-response cycle" not "just the response"

ghost commented 3 years ago

But then how is it different from dump_all

sigmavirus24 commented 3 years ago

The docs and do strings explain this. All is all request-response cycles including redirects. This is a single one, no redirect history