Skip to content

Commit

Permalink
Merge pull request #322 from infusionsoft/Fix_Param_Override
Browse files Browse the repository at this point in the history
Fix broken restful call params override
  • Loading branch information
ROMzombie authored Mar 26, 2024
2 parents e810682 + 9b9bbde commit de3b7be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Infusionsoft/Infusionsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,16 +511,14 @@ public function restfulRequest($method, $url, $params = array())
{
// Before making the request, we can make sure that the token is still
// valid by doing a check on the end of life.
$token = $this->getToken();
if ($this->authenticationType === AuthenticationType::OAuth2AccessToken && $this->isTokenExpired()) {
throw new TokenExpiredException;
}

$client = $this->getHttpClient();
$params = [];
$client = $this->getHttpClient();

if (strtolower($method) === 'get' || strtolower($method) === 'delete') {
$url = $url . '?' . http_build_query($params);
$url = $url . '?' . http_build_query($params);
} else {
$params['body'] = json_encode($params);
}
Expand Down

0 comments on commit de3b7be

Please sign in to comment.