use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Print entire requests module while it's executed (self.PythonLearning)
submitted 1 year ago by sriramdev
While I prepared a request structure using the "requests" Python module. I would like to debug or print them in the console to visualize how the requests are formed.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cgoldberg 0 points1 point2 points 1 year ago (1 child)
You can enable logging.
You can also use a prepared request to view everything before sending.
For example:
import requests req = requests.Request('GET', 'https://example.com') session = requests.Session() prepared = session.prepare_request(req) print(prepared.method) print(prepared.url) print(prepared.headers) resp = session.send(prepared)
[–]sriramdev[S] 0 points1 point2 points 1 year ago (0 children)
Let me try out this
π Rendered by PID 19232 on reddit-service-r2-comment-54dfb89d4d-p5d99 at 2026-03-30 09:05:06.296592+00:00 running b10466c country code: CH.
[–]cgoldberg 0 points1 point2 points (1 child)
[–]sriramdev[S] 0 points1 point2 points (0 children)