Skip to content

Commit

Permalink
Merge pull request #144 from it-can/master
Browse files Browse the repository at this point in the history
Disable expect header
  • Loading branch information
stephangroen authored Jun 12, 2017
2 parents 09ca7f5 + e10c655 commit a1af0ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Picqer/Financials/Exact/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Connection
* @var Client
*/
private $client;

/**
* @var callable(Connection)
*/
Expand Down Expand Up @@ -114,6 +114,7 @@ private function client()
$this->client = new Client([
'http_errors' => true,
'handler' => $handlerStack,
'expect' => false,
]);

return $this->client;
Expand Down Expand Up @@ -441,9 +442,9 @@ private function acquireAccessToken()
$this->accessToken = $body['access_token'];
$this->refreshToken = $body['refresh_token'];
$this->tokenExpires = $this->getDateTimeFromExpires($body['expires_in']);

if (is_callable($this->tokenUpdateCallback)) {
call_user_func($this->tokenUpdateCallback, $this);
call_user_func($this->tokenUpdateCallback, $this);
}
} else {
throw new ApiException('Could not acquire tokens, json decode failed. Got response: ' . $response->getBody()->getContents());
Expand Down Expand Up @@ -525,7 +526,7 @@ public function setDivision($division)
{
$this->division = $division;
}

/**
* @param callable $callback
*/
Expand Down

0 comments on commit a1af0ee

Please sign in to comment.