Add a timeout to HTTP queries.