Skip to content

Commit

Permalink
Clean up formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed May 27, 2019
1 parent b0d36b6 commit 46bcae6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Zttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class PendingZttpRequest
{
function __construct()
{
$this->beforeSendingCallbacks = collect([ function ($request, $options) {
$this->beforeSendingCallbacks = collect(function ($request, $options) {
$this->cookies = $options['cookies'];
}]);
});
$this->bodyFormat = 'json';
$this->options = [
'http_errors' => false,
Expand Down Expand Up @@ -173,11 +173,11 @@ function delete($url, $params = [])
function send($method, $url, $options)
{
try {
return tap(new ZttpResponse($this->buildClient()->request($method, $url, $this->mergeOptions(
['query' => $this->parseQueryParams($url)], $options))),
function($response) {
$response->cookies = $this->cookies;
});
return tap(new ZttpResponse($this->buildClient()->request($method, $url, $this->mergeOptions([
'query' => $this->parseQueryParams($url)
], $options))), function($response) {
$response->cookies = $this->cookies;
});
} catch (\GuzzleHttp\Exception\ConnectException $e) {
throw new ConnectionException($e->getMessage(), 0, $e);
}
Expand Down

0 comments on commit 46bcae6

Please sign in to comment.