From 1e11ea72ac094a989755991754d729308dab390b Mon Sep 17 00:00:00 2001 From: nyro Date: Wed, 6 Dec 2023 23:21:13 +0100 Subject: [PATCH] Fix form_params usage in Permanent token sendAuthenticatedRequest --- .../Api/Impl/PermanentTokens/RequestHandler.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Bynder/Api/Impl/PermanentTokens/RequestHandler.php b/src/Bynder/Api/Impl/PermanentTokens/RequestHandler.php index 7413c52..9e3f317 100644 --- a/src/Bynder/Api/Impl/PermanentTokens/RequestHandler.php +++ b/src/Bynder/Api/Impl/PermanentTokens/RequestHandler.php @@ -19,7 +19,18 @@ public function __construct($configuration) protected function sendAuthenticatedRequest($requestMethod, $uri, $options = []) { + $formParams = false; + if (isset($options['form_params'])) { + $formParams = $options['form_params']; + unset($options['form_params']); + } + $request = new \GuzzleHttp\Psr7\Request($requestMethod, $uri, $options); + + if ($formParams) { + $options['form_params'] = $formParams; + } + return $this->httpClient->sendAsync( $request, array_merge(