Skip to content

Commit ba6072b

Browse files
committed
Add guzzle client options to constructor
1 parent cf5683e commit ba6072b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/EazyJsonRpc/BaseJsonRpcClient.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ class BaseJsonRpcClient {
2222
*/
2323
public $UseObjectsInResults = false;
2424

25-
/**
26-
* Guzzle Client Options
27-
* @var array
28-
*/
29-
public $ClientOptions = [];
30-
3125
/**
3226
* Current Request id
3327
* @var int
@@ -68,9 +62,9 @@ class BaseJsonRpcClient {
6862
* Create New JsonRpc client
6963
* @param string $serverUrl
7064
*/
71-
public function __construct( string $serverUrl ) {
65+
public function __construct( string $serverUrl, array $clientOptions = [] ) {
7266
$opts = [ RequestOptions::TIMEOUT => 2.0 ];
73-
$opts = array_merge( $opts, $this->ClientOptions );
67+
$opts = array_merge( $opts, $clientOptions );
7468
$this->client = new Client( $opts );
7569
$this->serverUrl = $serverUrl;
7670
}

0 commit comments

Comments
 (0)