Skip to content

Commit 90caa98

Browse files
committed
:octocat: add default "Accept: application/json" headers in OAuth2Provider
1 parent 45085cd commit 90caa98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Core/OAuth2Provider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ protected function sendAccessTokenRequest(string $url, array $body):ResponseInte
209209

210210
$request = $this->requestFactory
211211
->createRequest('POST', $url)
212+
->withHeader('Accept', 'application/json')
212213
->withHeader('Accept-Encoding', 'identity')
213214
->withHeader('Content-Type', 'application/x-www-form-urlencoded')
214215
->withBody($this->streamFactory->createStream(QueryUtil::build($body, PHP_QUERY_RFC1738)))
@@ -301,6 +302,7 @@ protected function sendClientCredentialsTokenRequest(string $url, array $body):R
301302

302303
$request = $this->requestFactory
303304
->createRequest('POST', $url)
305+
->withHeader('Accept', 'application/json')
304306
->withHeader('Accept-Encoding', 'identity')
305307
->withHeader('Content-Type', 'application/x-www-form-urlencoded')
306308
->withBody($this->streamFactory->createStream(QueryUtil::build($body, PHP_QUERY_RFC1738)))

0 commit comments

Comments
 (0)