Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 6a8315b

Browse files
committed
Fix header content type.
1 parent 97ef26b commit 6a8315b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Diff for: composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"cakephp/cakephp": "^4.0"
1818
},
1919
"require-dev": {
20-
"php-http/client-integration-tests": "^0.6",
2120
"phpunit/phpunit": "^8.5"
2221
},
2322
"autoload": {

Diff for: src/Client.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Http\Adapter\Cake;
44

5-
use Cake\Core\Exception\Exception;
65
use Cake\Http\Client as CakeClient;
76
use Cake\Http\Client\Request;
87
use Http\Client\Exception\NetworkException;
@@ -53,7 +52,7 @@ public function sendRequest(RequestInterface $request): ResponseInterface
5352
->withProtocolVersion($request->getProtocolVersion())
5453
->withBody($request->getBody());
5554

56-
if (null === $cakeRequest->getHeader('Content-Type')) {
55+
if (!$cakeRequest->getHeader('Content-Type')) {
5756
$cakeRequest = $cakeRequest->withHeader('Content-Type', 'application/x-www-form-urlencoded');
5857
}
5958

0 commit comments

Comments
 (0)