This commit is contained in:
2021-09-10 10:50:56 +08:00
parent f217a14f23
commit 1db221c771
5 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -173,11 +173,11 @@ trait Message
/**
* @return string
* @return StreamInterface
*/
public function getBody(): string
public function getBody(): StreamInterface
{
return $this->stream->getContents();
return $this->stream;
}
+1 -1
View File
@@ -171,7 +171,7 @@ class ServerRequest extends Request implements ServerRequestInterface
if (empty($this->parsedBody)) {
$callback = Context::getContext('with.parsed.body.callback');
$this->parsedBody = $callback($this->getBody());
$this->parsedBody = $callback($this->getBody()->getContents());
}
return $this->parsedBody;
}