From fd7bb53511833fb19712ad051cf97928c2e28a77 Mon Sep 17 00:00:00 2001 From: frostealth Date: Fri, 1 Dec 2017 00:18:28 +0600 Subject: [PATCH] add http client configuration in service; close #29 --- src/Service.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Service.php b/src/Service.php index 9ea5f71..8c25ea9 100644 --- a/src/Service.php +++ b/src/Service.php @@ -45,6 +45,8 @@ class Service extends Component implements ServiceInterface * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration. + * + * @throws InvalidConfigException */ public function init() { @@ -150,6 +152,14 @@ public function setDebug($debug) $this->clientConfig['debug'] = $debug; } + /** + * @param array $options + */ + public function setHttpOptions(array $options) + { + $this->clientConfig['http'] = $options; + } + /** * @param string|array|object $resolver */