version = $version; $this->headers = $headers; $this->content = $content; } public function getHttpVersion(): Version { return $this->version; } public function getHeaders(): array { return $this->headers->getHeaders(); } public function hasHeader(string $name): bool { return $this->headers->hasHeader($name); } public function getHeader(string $name): HttpHeader { return $this->headers->getHeader($name); } public function getHeaderLine(string $name): string { return $this->headers->getHeaderLine($name); } public function getHeaderLines(string $name): array { return $this->headers->getHeaderLines($name); } public function getHeaderFirstLine(string $name): string { return $this->headers->getHeaderFirstLine($name); } public function hasContent(): bool { return $this->content !== null; } public function getContent(): ?IHttpContent { return $this->content; } public function isJsonContent(): bool { return $this->content instanceof JsonContent; } public function isFormContent(): bool { return $this->content instanceof FormContent; } public function isStreamContent(): bool { return $this->content instanceof StreamContent; } public function isStringContent(): bool { return $this->content instanceof StringContent; } public function isBencodedContent(): bool { return $this->content instanceof BencodedContent; } }