Skip to content

Commit

Permalink
Added possibility to specify options for guzzle
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek- committed Oct 13, 2015
1 parent 3fa6dc2 commit 5e09ed6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Nekland/BaseApi/Http/AbstractHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function send(Request $request, $withEvent = true)
/**
* @param string $option
* @param mixed $default
* @return mixed
*/
public function getOption($option, $default = null)
{
Expand Down
4 changes: 3 additions & 1 deletion lib/Nekland/BaseApi/Http/ClientAdapter/GuzzleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class GuzzleAdapter extends AbstractHttpClient
public function __construct(EventDispatcher $dispatcher, array $options = [], Client $client = null)
{
parent::__construct($dispatcher, $options);
$this->guzzle = $client ?: new Client();

$guzzleOptions = isset($options['guzzle']) ? $options['guzzle'] : [];
$this->guzzle = $client ?: new Client($guzzleOptions);
}

protected function execute(Request $request)
Expand Down

0 comments on commit 5e09ed6

Please sign in to comment.