src/Http/MultipartBody.php
private function createStreamFromString(string $string): Stream
    {
        $stream = new Stream(fopen('php://temp', 'r+b'));
        $stream->write($string);
        $stream->rewind();

        return $stream;
    }
private function createStreamFromString(string $string): Stream
    {
        $stream = new Stream(fopen('php://temp', 'r+b'));
        $stream->write($string);
        $stream->rewind();

        return $stream;
    }
Creates a stream from a string

@param string $string The string to create a stream for
@return Stream The stream
@throws RuntimeException Thrown if the stream could not be written to