- Using `StreamInterface->getContents` left the stream index at the end of the stream, which made every subsequent call to `getBody()` return empty string
- Using `StreamInterface->__toString()` magic method correctly seek the stream to the start before reading
}
/// @todo - fix mismatching use of "getBody()" as string here and parent "getBody()" as streaminterface
- public function getBody()
+ public function getBody(): string
{
- return parent::getBody()->getContents();
+ return (string) parent::getBody();
}
}