public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
public function build ( ) { $ stream = new Stream ( 'php://temp' , 'wb+' ) ; $ stream -> write ( json_encode ( new MessageDecorator ( $ this -> getMessage ( ) ) ) ) ; return $ this -> getHttpMessage ( ) -> withAddedHeader ( 'Content-Type' , 'application/json' ) -> withBody ( $ stream ) ; }
Build the response to send

@return MessageInterface
Build the response to send