Closed bondt closed 8 years ago
Yep, this is a fair point, I agree. Currently we're appending, this needs to be changed :)
You can overwrite the default value of CURLOPT_TIMEOUT by passing it in as part of the second argument to performRequest
. For example:
$req->performRequest(true, array( 'CURLOPT_TIMEOUT' => 2 ) );
The Pull Request is here https://github.com/J7mbo/twitter-api-php/pull/178 =)
@glenscott that does't work. That is because the array is concatenated and hence the array on the left will take precedence over the argument passed in into performRequest(). By changing it to array_merge, I am able to overwrite it because now, the argument passed into performRequest() takes precedence.
@lesterchan, awesome, thanks!
@lesterchan array_merge is not good here because it will reindex cURL's numeric options keys so they will not work for cURL anymore
Hi,
I would like to propose an option where we can overwrite the default value for CURLOPT_TIMEOUT in performRequest, as seen here: https://github.com/J7mbo/twitter-api-php/blob/master/TwitterAPIExchange.php#L282
How say you?