Skip to content

Conversation

@glaubinix
Copy link
Contributor

There is currently no way to change the timeout for the Curl client. Only way to do so is by setting a new client.

Current way:

$client = new \Gitlab\Client('https://gitlab.com/api/v3/');
$client->setOption('timeout', 1);
$client->setHttpClient(new HttpClient($client->getBaseUrl(), ['timeout' => 1], $curl));

Once this PR is merged you can simply do:

$client = new \Gitlab\Client('https://gitlab.com/api/v3/', null, ['timeout' => 1]);

@radutopala radutopala merged commit c3095ca into GitLabPHP:master Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants