We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3cb403 commit 8dc7931Copy full SHA for 8dc7931
CHANGELOG.md
@@ -2,6 +2,11 @@ CHANGE LOG
2
==========
3
4
5
+## 10.0.0-RC2 (UPCOMING)
6
+
7
+* Restored 9.x behaviour for empty JSON responses
8
9
10
## 10.0.0-RC1 (22/07/2020)
11
12
* Removed all deprecated functionality
src/HttpClient/Message/ResponseMediator.php
@@ -45,7 +45,7 @@ public static function getContent(ResponseInterface $response)
45
{
46
$body = (string) $response->getBody();
47
48
- if (0 === \strpos($response->getHeaderLine('Content-Type'), self::JSON_CONTENT_TYPE)) {
+ if ('' !== $body && 0 === \strpos($response->getHeaderLine('Content-Type'), self::JSON_CONTENT_TYPE)) {
49
return JsonArray::decode($body);
50
}
51
0 commit comments