WARCRecord
WARC record class. The WARC named fields are properties on this object
Constructor Summary
Public Constructor | ||
public |
constructor(warcParts: {header: Buffer[], c1: Buffer[], c2: Buffer[]}) Create a new WARCRecord |
Member Summary
Public Members | ||
public |
The content of the record. |
|
public |
An object containing the parsed request or response records HTTP information |
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
warcFilename: string: * |
|
public |
An object containing the parsed WARC header |
|
public get |
warcIPAddress: string: * |
|
public get |
|
|
public get |
|
|
public get |
warcProfile: string: * |
|
public get |
warcRecordID: string: * |
|
public get |
warcRefersTo: string: * |
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
warcTargetURI: string: * |
|
public get |
warcTruncated: string: * |
|
public get |
|
|
public get |
warcWarcinfoID: string: * |
Method Summary
Public Methods | ||
public |
getWARCHeader(headerKey: string): string Retrieve the value of this records header field. |
|
public |
hasWARCHeader(headerKey: string): boolean Determine if this warc record header has the supplied WARC named field. |
Public Constructors
Public Members
public httpInfo: RequestHTTP | ?ResponseHTTP source
An object containing the parsed request or response records HTTP information
Public Methods
public getWARCHeader(headerKey: string): string source
Retrieve the value of this records header field. If the supplied header key does not start with WARC then this it will be added.
Params:
Name | Type | Attribute | Description |
headerKey | string |
|
The WARC header key (named field) |
Example:
// both ways are equivalent to retrieve WARC-Type field
record.getWARCHeader('WARC-Type')
record.getWARCHeader('Type')
public hasWARCHeader(headerKey: string): boolean source
Determine if this warc record header has the supplied WARC named field. If the supplied header key does not start with WARC then this it will be added.
Params:
Name | Type | Attribute | Description |
headerKey | string |
|
The WARC header key (named field) |
Example:
// both ways are equivalent to determine if the record has the WARC-Type field
record.hasWARCHeader('WARC-Type')
record.hasWARCHeader('Type')