Add a timeout to the network requests.