Skip to content

Commit

Permalink
Fixes regression bug
Browse files Browse the repository at this point in the history
Non-image service requests should have the payload data json-encoded.
  • Loading branch information
emilh91 committed Oct 3, 2015
1 parent 80aafc4 commit d69c06f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ private function request($method, $endpoint, array $query=array(), array $payloa
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);

if ($method == 'POST') {
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$data = $img_svc_url ? $payload : json_encode($payload);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}

$result = curl_exec($ch);
Expand Down

0 comments on commit d69c06f

Please sign in to comment.