Skip to content

Commit

Permalink
Merge pull request #3 from lineten/feature/NDSV2-1889
Browse files Browse the repository at this point in the history
NDSV2-1889 Support application/problem+json
  • Loading branch information
timohuovinen authored May 7, 2021
2 parents 4a677eb + d9d1868 commit 95d3ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CurlResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function getBodyString()
public function getParsedBody()
{
$contentType = $this->getContentType();
if (ContentType::APPLICATION_JSON === $contentType) {
if (in_array($contentType, [ContentType::APPLICATION_JSON, 'application/problem+json'])) {
return json_decode($this->getBody()->__toString(), true);
}
if (ContentType::APPLICATION_FORM_URLENCODED === $contentType) {
Expand Down

0 comments on commit 95d3ad8

Please sign in to comment.