Take timeout into consideration for HTTP request