Request
Constructor Summary
Public Constructor | ||
public |
constructor(client: Object, event: Object, frame: Frame, redirectChain: Array<Request>, interceptionId: string, allowInterception: boolean) |
Member Summary
Protected Members | ||
protected |
|
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_purl: URL |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
async abort(errorCode: string=) |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
async getPostData(): Promise<Buffer> Returns post data sent with the request. |
|
public |
|
|
public |
|
|
public |
Returns the value for the supplied header (case insensitive) if it exists. |
|
public |
Returns the HTTP headers as sent by the browser. |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
Returns the normalized (header keys in lowercase) HTTP headers as sent by the browser. |
|
public |
parsedURL(): URL |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
requestLine(noHTTP2Plus: boolean): string |
|
public |
requestLineAndHeaders(noHTTP2Plus: boolean): string |
|
public |
resourceType(): * |
|
public |
async respond(response: {status: number, headers: Object, contentType: string, body: string|Buffer}) |
|
public |
|
|
public |
|
|
public |
toJSON(): {headers: Object, initialPriority: string, method: string, referrerPolicy: string, frameId: string, mixedContentType: ?string, documentURL: string, initiator: string, loaderId: string, hasPostData: ?boolean, urlFragment: ?string, type: string, url: string, isLinkPreload: boolean, requestId: string, response: ?Response, hasUserGesture: boolean, wallTime: number, fromMemoryCache: boolean, postData: ?string, timestamp: number} |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Public Constructors
Public Methods
public async abort(errorCode: string=) source
Params:
Name | Type | Attribute | Description |
errorCode | string= |
public async continue(overrides: {url?: string, method?: string, postData?: string, headers?: !Object}) source
public async getPostData(): Promise<Buffer> source
Returns post data sent with the request. Returns an error when no data was sent with the request
public header(header: string): string source
Returns the value for the supplied header (case insensitive) if it exists. See Request#normalizedHeaders and Request#headers for more details
Params:
Name | Type | Attribute | Description |
header | string |
public headers(): Object source
Returns the HTTP headers as sent by the browser. If the full request HTTP headers are available (CDPResponse.requestHeaders) they are returned otherwise the value of CDPRequest.headers are returned.
public normalizedHeaders(): Object source
Returns the normalized (header keys in lowercase) HTTP headers as sent by the browser. See Request#headers for more details
public requestLine(noHTTP2Plus: boolean): string source
Params:
Name | Type | Attribute | Description |
noHTTP2Plus | boolean |
|
When true if the request was made via HTTP2/HTTP3 the protocol is forced to HTTP/1.1 |
public requestLineAndHeaders(noHTTP2Plus: boolean): string source
Params:
Name | Type | Attribute | Description |
noHTTP2Plus | boolean |
|
When true if the request was made via HTTP2/HTTP3 the protocol is forced to HTTP/1.1 |
public async respond(response: {status: number, headers: Object, contentType: string, body: string|Buffer}) source
public toJSON(): {headers: Object, initialPriority: string, method: string, referrerPolicy: string, frameId: string, mixedContentType: ?string, documentURL: string, initiator: string, loaderId: string, hasPostData: ?boolean, urlFragment: ?string, type: string, url: string, isLinkPreload: boolean, requestId: string, response: ?Response, hasUserGesture: boolean, wallTime: number, fromMemoryCache: boolean, postData: ?string, timestamp: number} source
Return:
{headers: Object, initialPriority: string, method: string, referrerPolicy: string, frameId: string, mixedContentType: ?string, documentURL: string, initiator: string, loaderId: string, hasPostData: ?boolean, urlFragment: ?string, type: string, url: string, isLinkPreload: boolean, requestId: string, response: ?Response, hasUserGesture: boolean, wallTime: number, fromMemoryCache: boolean, postData: ?string, timestamp: number} |