Home Reference Source Repository
public class | source

RemoteChromeWARCGenerator

Extends:

WARCWriterBase → RemoteChromeWARCGenerator

WARC Generator for use with chrome-remote-interface

Expects request data from RemoteChromeRequestCapturer

See:

Method Summary

Public Methods
public

async generateGet(nreq: Object, network: Object): Promise<void>

Generates The Request Response WARC Records for GET

public

async generateOnlyRes(nreq: Object, network: Object): Promise<void>

If a stray response comes in without a request HTTP/2 likely preserve it!

public

async generateOptions(nreq: Object, network: Object): Promise<void>

Generates The Request Response WARC Records for OPTIONS

public

async generateOther(nreq: Object, network: Object): Promise<void>

Handle Non HTTP POST GET OPTIONS request.

public

async generatePost(nreq: Object, network: Object): Promise<void>

Generates The Request Response WARC Records for POST

public

async generateRedirectResponse(nreq: Object, network: Object): Promise<void>

Special Case Handler To Correctly Serialize 3xx Responses.

Public Methods

public async generateGet(nreq: Object, network: Object): Promise<void> source

Generates The Request Response WARC Records for GET

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP request/response for the GET request

network Object

the chrome-remote-interface Network object

Return:

Promise<void>

public async generateOnlyRes(nreq: Object, network: Object): Promise<void> source

If a stray response comes in without a request HTTP/2 likely preserve it!

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP response

network Object

the chrome-remote-interface Network object

Return:

Promise<void>

public async generateOptions(nreq: Object, network: Object): Promise<void> source

Generates The Request Response WARC Records for OPTIONS

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP request/response for the OPTIONS request

network Object

the chrome-remote-interface Network object

Return:

Promise<void>

public async generateOther(nreq: Object, network: Object): Promise<void> source

Handle Non HTTP POST GET OPTIONS request. And yes the live web uses them all

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP request/response

network Object

the chrome-remote-interface Network object

Return:

Promise<void>

public async generatePost(nreq: Object, network: Object): Promise<void> source

Generates The Request Response WARC Records for POST

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP request/response for the POST request

network Object

the chrome-remote-interface Network object

Return:

Promise<void>

public async generateRedirectResponse(nreq: Object, network: Object): Promise<void> source

Special Case Handler To Correctly Serialize 3xx Responses.

The browser will automatically chase down 3xx responses until terminal status is reached 2xx, 4xx, 5xx. So we must account for that fact and the redirectResponse is guarantied to be an array or plain object.

Params:

NameTypeAttributeDescription
nreq Object

the captured HTTP request/response for the redirected request

network Object

the chrome-remote-interface Network object

Return:

Promise<void>