Skip to content

Commit

Permalink
Merge pull request #10 from Nekland/feature/options-to-guzzle
Browse files Browse the repository at this point in the history
Add possibility to specify options for guzzle
  • Loading branch information
Nek- committed Oct 13, 2015
2 parents 3fa6dc2 + 5e09ed6 commit 52db0e1
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 52db0e1

Please sign in to comment.