Skip to content

Commit b88aae3

Browse files
committed
Bump Symfony version, added method to get raw response content
1 parent 144c69e commit b88aae3

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

composer.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
"type": "library",
55
"license": "MIT",
66
"require": {
7-
"symfony/http-client": "^5.0",
8-
"symfony/browser-kit": "^5.0",
9-
"illuminate/support": "^8.0",
10-
"php": "^7.3"
7+
"symfony/http-client": "^5.2",
8+
"symfony/browser-kit": "^5.2",
9+
"illuminate/support": "^8.0"
1110
},
1211
"require-dev": {
13-
"phpunit/phpunit": "^9.0",
1412
"illuminate/container": "^8.0",
1513
"illuminate/cache": "^8.0",
1614
"illuminate/pipeline": "^8.0"

src/Response/Response.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,21 @@ public function getContent($throw = true)
5050
try {
5151
return $this->toCollection();
5252
} catch (JsonException $exception) {
53-
return $this->baseResponse->getContent($throw);
53+
return $this->getRawContent($throw);
5454
}
5555
}
5656

57+
/**
58+
* Get body of response
59+
*
60+
* @param bool $throw
61+
* @return string
62+
*/
63+
public function getRawContent($throw = true)
64+
{
65+
return $this->baseResponse->getContent($throw);
66+
}
67+
5768
/**
5869
* Pass response content to function
5970
*

0 commit comments

Comments
 (0)