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
......@@ -33,10 +33,4 @@ interface ApiClientOptions extends HttpClientOptions, SerializerOptions
* @return string
*/
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
$options->getLogger(),
$options->getApiUrl(),
$options->getDefaultRequestHeaders(),
$options->getTimeout()
($options instanceof ApiClientOptionsTimeout)? $options->getTimeout(): null
);
if ($options->isCachedClient()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment