Skip to content

Commit

Permalink
Merge pull request #18 from ewaldmedia/patch-1
Browse files Browse the repository at this point in the history
Update PlentymarketsRestClient.php
  • Loading branch information
repat authored Feb 28, 2022
2 parents 72f4993 + faf69ad commit 299e89b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PlentymarketsRestClient/PlentymarketsRestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ public function singleCall($method, $path, $params = [])
$this->handleRateLimiting($response);
}

return json_decode($response->getBody(), true);
if($response->getHeaders()['Content-Type'][0] == 'application/pdf'){
return $response->getBody()->getContents();
}else{
return json_decode($response->getBody(), true);
}
}

public function get($path, $array = [])
Expand Down

0 comments on commit 299e89b

Please sign in to comment.