How to get tls version for the httpx Client request #2745
Unanswered
heysarthak
asked this question in
Q&A
Replies: 2 comments
-
|
You might want to look at using the def log(event_name, info):
print(event_name, info)
resp = conn.request("POST", "https://{}:{}".format(serviceName,ip_port), data=data, extensions={"trace": log})Or you can inspect the network stream on the response instance... resp.extensions["network_stream"].get_extra_info("ssl_object") |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This solution may work if you use import httpx
conn = httpx.Client()
with conn.stream('GET', "https://www.google.com") as resp:
stream = resp.extensions['network_stream']
print(stream.get_extra_info('socket').cipher())OUTPUT |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i am following the below method
conn = httpx.Client(http2=True,http1=False,verify=ssl_contexts)resp = conn.request("POST","https://{}:{}".format(serviceName,ip_port),data=data)How can i get the tls version of the given request?
Beta Was this translation helpful? Give feedback.
All reactions