Skip to content

Commit

Permalink
Update Client.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHallCom committed Sep 25, 2020
1 parent 8055ea7 commit 4868d1e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Client.php
Expand Up @@ -212,7 +212,7 @@ public function upload(array $options)
$options['FileContentType'] = 'b2/x-auto';
}

$response = $this->client->request('POST', $uploadEndpoint, [
$response = $this->client->guzzleRequest('POST', $uploadEndpoint, [
'headers' => [
'Authorization' => $uploadAuthToken,
'Content-Type' => $options['FileContentType'],
Expand Down Expand Up @@ -264,7 +264,7 @@ public function download(array $options)

$this->authorizeAccount();

$response = $this->client->request('GET', $requestUrl, $requestOptions, false);
$response = $this->client->guzzleRequest('GET', $requestUrl, $requestOptions, false);

return isset($options['SaveAs']) ? true : $response;
}
Expand Down Expand Up @@ -427,7 +427,7 @@ protected function authorizeAccount()
return;
}

$response = $this->client->request('GET', self::B2_API_BASE_URL.self::B2_API_V1.'/b2_authorize_account', [
$response = $this->client->guzzleRequest('GET', self::B2_API_BASE_URL.self::B2_API_V1.'/b2_authorize_account', [
'auth' => [$this->accountId, $this->applicationKey],
]);

Expand Down Expand Up @@ -614,7 +614,7 @@ protected function uploadParts($filePath, $uploadUrl, $largeFileAuthToken)
array_push($sha1_of_parts, sha1($data_part));
fseek($file_handle, $total_bytes_sent);

$response = $this->client->request('POST', $uploadUrl, [
$response = $this->client->guzzleRequest('POST', $uploadUrl, [
'headers' => [
'Authorization' => $largeFileAuthToken,
'Content-Length' => $bytes_sent_for_part,
Expand Down Expand Up @@ -683,7 +683,7 @@ protected function sendAuthorizedRequest($method, $route, $json = [])
{
$this->authorizeAccount();

return $this->client->request($method, $this->apiUrl.$route, [
return $this->client->guzzleRequest($method, $this->apiUrl.$route, [
'headers' => [
'Authorization' => $this->authToken,
],
Expand Down

0 comments on commit 4868d1e

Please sign in to comment.