function withBody(StreamInterface $body) : self { if ($this->stream === $body) { return $this; } $new = clone $this; $new->stream = $body; $new->body = $body->extract(); return $new; }