Setting time limit for getting requests response with try-except

240 Views Asked by At

My Python 3.8 script consumes an external REST API using requests, which is sometimes slow. How can I set a time limit to waiting for each response so that it just skips that request and treat that iteration as incomplete, preferably using try-except?

0

There are 0 best solutions below