<p dir="auto">Python <strong>requests</strong> library changes URL in some situations.<br>
it removes some parameters<br>
for example<br>
<code class="notranslate">url = "https://www.example.com/test?"</code><br>
it removes <code class="notranslate">?</code> in the request when I see it in Burp proxy<br>
it changes to<br>
<code class="notranslate">https://www.example.com/test</code><br>
because I'm pentesting web applications I need to send for example quotation mark too and other things which will be removed by library automatically.<br>
I need following path:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/61124903/182108804-e9811743-2ba4-41d3-8266-9e6d97998e4a.png"><img src="https://user-images.githubusercontent.com/61124903/182108804-e9811743-2ba4-41d3-8266-9e6d97998e4a.png" alt="image" style="max-width: 100%;"></a><br>
after ? must be empty</p>
<p dir="auto">As spending about 10 minutes figuring out how to log raw request/responses in requests, I eventually came across the following <a href="http://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application" rel="nofollow">SO article</a>, which references an obscure part of the <a href="http://docs.python-requests.org/en/master/api/?highlight=debuglevel" rel="nofollow">documentation</a>.</p>
<p dir="auto">It would be nice if there was a clear section in the docs which explains how to do this, as it's not very clear and took quite a bit of searching. A quick copy/paste (or a complete move) would suffice. Thoughts?</p>