Skip to content

Client: allow usage of options #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2017

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