src/HttpFactory.php
public function createStream(string $content = ''): StreamInterface
    {
        $stream = new Stream();
        $stream->write($content);

        return $stream;
    }
public function createStream(string $content = ''): StreamInterface
    {
        $stream = new Stream();
        $stream->write($content);

        return $stream;
    }
Create a new stream from a string.

The stream SHOULD be created with a temporary resource.

@param string $content String content with which to populate the stream.

@return \Psr\Http\Message\StreamInterface