CDPRequestInfo
Represents a request and response
Static Method Summary
| Static Public Methods | ||
| public static |
fromRedir(info: Object): CDPRequestInfo Create a new RequestInfo from a request that redirected |
|
| public static |
fromRequest(info: Object): CDPRequestInfo Create a new RequestInfo from a request |
|
| public static |
fromResponse(info: Object): CDPRequestInfo Create a new RequestInfo from a response |
|
Constructor Summary
| Public Constructor | ||
| public |
Construct a new CDPRequestInfo |
|
Member Summary
| Public Members | ||
| public |
Boolean indicating if the response body should be retrieved |
|
| public |
Boolean indicating if the requests post data should be retrieved |
|
| public |
The HTTP method used to make this request |
|
| public |
The post data of the request if any was sent |
|
| public |
The HTTP protocol used to make this request |
|
| public |
The request HTTP headers object on the CDP Response object |
|
| public |
The raw request HTTP header string on the CDP Response object |
|
| public |
The request HTTP headers object on the CDP Request object |
|
| public |
The id of the request |
|
| public |
The response HTTP header object on the CDP Response object |
|
| public |
The raw response HTTP header string on the CDP Response object |
|
| public |
The HTTP status of the response |
|
| public |
The HTTP status reasons text of the response |
|
| public get |
|
|
| public |
The fragment portion of the requests URL. |
|
| Private Members | ||
| private |
The URL of the request. |
|
Method Summary
| Public Methods | ||
| public |
addResponse(res: Object, not3xx: boolean) Add the requests response information |
|
| public |
Determine if we have enough information to serialize the response |
|
| public |
getParsedURL(): URL Returns a URL object representing this requests URL |
|
| public |
Serialize the request headers for the WARC entry |
|
| public |
Serialize the response headers for the WARC entry |
|
| Private Methods | ||
| private |
Ensure that the request info object has its method property set |
|
| private |
_correctProtocol(originalProtocol: string): string Ensure that the request info object has the correct protocol property |
|
| private |
|
|
| private |
Returns the correct request header object or null if there is none |
|
| private |
_methProtoFromReqHeadText(requestHeadersText: string) Set The Requests Method And Protocol From The Request Headers Text |
|
| private |
Serializes request headers object |
|
| private |
Returns the request headers text that is replay able |
|
Static Public Methods
public static fromRedir(info: Object): CDPRequestInfo source
Create a new RequestInfo from a request that redirected
Params:
| Name | Type | Attribute | Description |
| info | Object | The object received from Network.requestWillBeSent |
public static fromRequest(info: Object): CDPRequestInfo source
Create a new RequestInfo from a request
Params:
| Name | Type | Attribute | Description |
| info | Object | The object received from Network.requestWillBeSent |
public static fromResponse(info: Object): CDPRequestInfo source
Create a new RequestInfo from a response
Params:
| Name | Type | Attribute | Description |
| info | Object | The object received from Network.responseReceived |
Public Constructors
Public Members
public requestHeadersText: string source
The raw request HTTP header string on the CDP Response object
public responseHeadersText: string source
The raw response HTTP header string on the CDP Response object
public urlFragment: string source
The fragment portion of the requests URL. Only defined if representation of the URL returned by the CDP has this property.
Private Members
Public Methods
public canSerializeResponse(): boolean source
Determine if we have enough information to serialize the response
Private Methods
private _correctProtocol(originalProtocol: string): string source
Ensure that the request info object has the correct protocol property
Params:
| Name | Type | Attribute | Description |
| originalProtocol | string | The ordinal protocol of the request |
private _ensureProto() source
private _getReqHeaderObj(): Object source
Returns the correct request header object or null if there is none
private _methProtoFromReqHeadText(requestHeadersText: string) source
Set The Requests Method And Protocol From The Request Headers Text
Params:
| Name | Type | Attribute | Description |
| requestHeadersText | string |
|
The Full HTTP Headers String |
