public function withBody(StreamInterface $body) : self
    {
        $new = clone $this;

        return $new->setResponse($this->response->withBody($body));
    }
public function withBody(StreamInterface $body) : self
    {
        $new = clone $this;

        return $new->setResponse($this->response->withBody($body));
    }
public function withBody ( StreamInterface $ body ) : self { $ new = clone $ this ; return $ new -> setResponse ( $ this -> response -> withBody ( $ body ) ) ; }
Returns an instance with the specified message body.

@param \Psr\Http\Message\StreamInterface $body

@return self
Returns an instance with the specified message body .