Skip to content

Commit 9536253

Browse files
committed
Fix for SaaS cloudfront specs
1 parent df2fb1b commit 9536253

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/CloudCMS.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,19 @@ public function request($method, $uri, $params = array(), $data = array())
7272
}
7373

7474
$url = $this->baseURL . $uri . "?" . Psr7\build_query($params);
75-
$request = $this->provider->getAuthenticatedRequest($method, $url, $this->token, [
76-
"body" => json_encode($data, JSON_FORCE_OBJECT)
77-
]);
75+
76+
$request = null;
77+
if ($method == "GET" || $method == "DELETE")
78+
{
79+
$request = $this->provider->getAuthenticatedRequest($method, $url, $this->token);
80+
}
81+
else
82+
{
83+
$request = $this->provider->getAuthenticatedRequest($method, $url, $this->token, [
84+
"body" => json_encode($data, JSON_FORCE_OBJECT)
85+
]);
86+
}
87+
7888
$response = $this->provider->getResponse($request);
7989

8090
return json_decode($response->getBody(), true);

0 commit comments

Comments
 (0)