Skip to content

Commit

Permalink
debug: print requests url and body
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Dec 4, 2024
1 parent d545f80 commit c0dae4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wikiteam3/dumpgenerator/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def print_request(r: requests.Response, *args, **kwargs):
# print("H:", r.request.headers)
for _r in r.history:
print("Resp (history): ", _r.request.method, _r.status_code, _r.reason, _r.url)
print(f"Reqs: {r.request.method} {r.url}, {r.request.body}")
print(f"Resp: {r.request.method} {r.status_code} {r.reason} {r.url}")
if r.raw._connection.sock:
print(f"Conn: {r.raw._connection.sock.getsockname()} -> {r.raw._connection.sock.getpeername()[0]}")
Expand Down

0 comments on commit c0dae4c

Please sign in to comment.