Skip to content

Commit 1798671

Browse files
[HttpClient] fix merge
1 parent 87d846f commit 1798671

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
9797
}
9898

9999
if (isset($options['body'])) {
100-
if (\is_array($options['body']) && !isset($options['normalized_headers']['content-type'])) {
100+
if (\is_array($options['body']) && (!isset($options['normalized_headers']['content-type'][0]) || !str_contains($options['normalized_headers']['content-type'][0], 'application/x-www-form-urlencoded'))) {
101101
$options['normalized_headers']['content-type'] = ['Content-Type: application/x-www-form-urlencoded'];
102102
}
103103

0 commit comments

Comments
 (0)