Skip to content

Commit f8a5482

Browse files
committed
feat: improve HTTP client transfer handling
1 parent 5708955 commit f8a5482

2 files changed

Lines changed: 392 additions & 1 deletion

File tree

src/Net/Http/Parser/RequestParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private function parseRequestBody(): void
464464
{
465465
if ($this->method->value === 'POST') {
466466
if (str_contains($this->contentType, 'application/json')) {
467-
$this->post = array_merge($this->post, json_decode($content = $this->content, true) ?? []);
467+
$this->post = array_merge($this->post, json_decode($this->content ?? "", true) ?? []);
468468
} elseif ($this->contentType === 'application/x-www-form-urlencoded') {
469469
parse_str($this->content, $this->post);
470470
}

0 commit comments

Comments
 (0)