Skip to content

Commit f875382

Browse files
committed
♻️ Use http_build_query() for building Auth Request body.
1 parent c93a50a commit f875382

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Context/JsonApiContext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,8 @@ protected function sendOauthRequest(array $payload)
732732
{
733733
$url = sprintf('%s%s', $this->baseUrl, $this->parameters['oauth']['uri']);
734734

735-
$response = $this->client->post($url, $this->headers, json_encode($payload));
735+
$this->headers['Content-Type'] = 'application/x-www-form-urlencoded';
736+
$response = $this->client->post($url, $this->headers, http_build_query($payload));
736737
$responseContent = json_decode($response->getContent());
737738

738739
// Throw an exception if the statuscode is not 200

0 commit comments

Comments
 (0)