Skip to content
Snippets Groups Projects
Commit db458452 authored by dyszczo's avatar dyszczo
Browse files

ApiClientOptionsTimeout interface

parent 37eeab33
No related branches found
No related tags found
1 merge request!3Added timeout to options.
Pipeline #5150 passed
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
...@@ -33,10 +33,4 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions ...@@ -33,10 +33,4 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions
* @return string * @return string
*/ */
public function getApiClientClass(); public function getApiClientClass();
/**
* @return int
*/
public function getTimeout();
} }
\ No newline at end of file
<?php
namespace WPDesk\ApiClient\Client;
interface ApiClientOptionsTimeout extends ApiClientOptions
{
/**
* @return int
*/
public function getTimeout();
}
\ No newline at end of file
...@@ -25,7 +25,7 @@ class ClientFactory ...@@ -25,7 +25,7 @@ class ClientFactory
$options->getLogger(), $options->getLogger(),
$options->getApiUrl(), $options->getApiUrl(),
$options->getDefaultRequestHeaders(), $options->getDefaultRequestHeaders(),
$options->getTimeout() ($options instanceof ApiClientOptionsTimeout)? $options->getTimeout(): null
); );
if ($options->isCachedClient()) { if ($options->isCachedClient()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment