Problem Statement
What is true about timeouts in the requests library?
Explanation
By default, requests may block indefinitely. Always pass a timeout as a tuple or number to bound connect and read waits.
This prevents hung workers and improves reliability in production services.
Code Solution
SolutionRead Only
import requests r = requests.get(url, timeout=(3.05, 10))
Practice Sets
This question appears in the following practice sets:
