Tuesday, 22 June 2021

What's the fastest way to send a post request with python?

I tried the normal "requests" module but it's really slow, is there any faster way of sending a POST request?

import requests 
from time import time 
t = time() 
requests.post("https://httpbin.org/post") 
print(time() - t)  # 0.884 s

It is also true with GET requests:

requests.get("https://example.com/") 
print(time() - t)  # 0.604 s


from What's the fastest way to send a post request with python?

No comments:

Post a Comment