public function encode() { return sprintf("%s %s HTTP/%s\r\n%s\r\n%s", $this->getMethod(), $this->getTarget(), $this->getProtocolVersion(), $this->encodeHeaders($this->getHeaders()), (string) $this->getBody()); }