Skip to content

Commit 032d817

Browse files
committed
Fixed http client
1 parent 4d1b22d commit 032d817

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/http-client.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ class HttpClient extends Client
1212
public function __construct($apiKey, SecureNativeOptions $options)
1313
{
1414
$defaultOptions = [
15-
// TODO: Check why handler func doesn't work
16-
// 'handler' => $this->getHandlerStack(),
15+
'handler' => $this->getHandlerStack(),
1716
'base_uri' => $options->getApiUrl(),
18-
'timeout' => 2,
17+
'timeout' => $options->getTimeout() / 1000,
1918
'headers' => [
2019
'User-Agent' => 'SecureNative-PHP',
2120
'SN-Version'=> '1.0.0',
@@ -33,8 +32,10 @@ protected function getHandlerStack()
3332
{
3433
$handlerStack = HandlerStack::create($this->getHandler());
3534

36-
$this->configureHandlerStack($handlerStack);
37-
3835
return $handlerStack;
3936
}
37+
38+
protected function getHandler() {
39+
return null;
40+
}
4041
}

0 commit comments

Comments
 (0)