Repository navigation
How to get server IP from Httpx get response #1056
|
How should I get the server IP address from the Httpx get response? import httpx
with httpx.Client() as hc:
r = hc.get("https://httpbin.org/get")
peername = r.stream._stream._httpcore_stream._stream._connection._network_stream._sock.getpeername()
print(r.json())
print(peername)Is there a better way? |
Answered by
ElliotGarbus
Mar 24, 2023
Replies: 1 comment
|
wrong httpx... |
0 replies
Answer selected by
ElliotGarbus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wrong httpx...