Set timeout when making the HTTP connection