Skip to content

Commit

Permalink
remove Accept header force to application/vnd.siren+json
Browse files Browse the repository at this point in the history
  • Loading branch information
lbscld committed Jul 12, 2019
1 parent 2192aa2 commit 07a536d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Oauth/ViessmannOauthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ final class ViessmannOauthService extends AbstractService
private $authorizeURL = 'https://iam.viessmann.com/idp/v1/authorize';
private $token_url = 'https://iam.viessmann.com/idp/v1/token';
protected $redirect_uri = "vicare://oauth-callback/everest";
const X_API_KEY = '38c97795ed8ae0ec139409d785840113bb0f5479893a72997932d447bd1178c8';

/**
* ViessmannOauthClient constructor.
Expand Down Expand Up @@ -120,12 +121,8 @@ public function getAuthorizationUri(array $additionalParameters = array())

public function request($path, $method = 'GET', $body = null, array $extraHeaders = array())
{
$viessmanHeader = array(
'Accept' => 'application/vnd.siren+json',
'x-api-key' => 'token 38c97795ed8ae0ec139409d785840113bb0f5479893a72997932d447bd1178c8'
);

return parent::request($path, $method, $body, $viessmanHeader);
$extraHeaders ['x-api-key'] = 'token ' . self::X_API_KEY . '';
return parent::request($path, $method, $body, $extraHeaders);
}

}

0 comments on commit 07a536d

Please sign in to comment.