Closed Mennaruuk closed 2 years ago
The object returned from .get
etc when using requests_futures
is the Future
object. It's not the actual response, just a thing you can use to retrieve it when you're ready for it. e.g.
future = futures_session.get('https://google.com/')
# some time passes, you do other things, whatever
# this gets the actual response, everything was happening in the background until now, if there was an exception it'll be thrown here.
resp = future.result()
print(resp.status_code)
When using requests-futures to check status codes of websites, I get the following error:
Is there a status code attribute?
Thank you.