Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/mod.ts>HTTPResponse

Headless Chrome Deno API
Latest
class HTTPResponse
Re-export
import { HTTPResponse } from "https://deno.land/x/pptr@1.2.0/mod.ts";

The HTTPResponse class represents responses which are received by the Page class.

Constructors

new
HTTPResponse(
client: CDPSession,
request: HTTPRequest,
responsePayload: Protocol.Network.Response,
)

Properties

private
_bodyLoadedPromise: Promise<Error | void>
private
optional
_bodyLoadedPromiseFulfill: (err: Error | void) => void
private
_client: CDPSession
private
_contentPromise: Promise<Uint8Array> | null
private
_fromDiskCache: boolean
private
_fromServiceWorker: boolean
private
_headers: Record<string, string>
private
_remoteAddress: RemoteAddress
private
_request: HTTPRequest
private
_securityDetails: SecurityDetails | null
private
_status: number
private
_statusText: string
private
_url: string

Methods

_resolveBody(err?: Error): void
buffer(): Promise<Uint8Array>
frame(): Frame | null
fromCache(): boolean
headers(): Record<string, string>
json(): Promise<any>
ok(): boolean
status(): number
statusText(): string
text(): Promise<string>
url(): string