Type of the argument expected by checksum. It specifies which data from the request to include in the checksum.

To include or exclude data, not every kind of data from the request has the same complexity. For instance, the HTTP method is simple: use it or don't use it. But for things like query parameters, headers, body: you might want to select/filter.

interface ChecksumArgs {
    body?: boolean | FilterableSpec<Buffer, string | Buffer>;
    customData?: any;
    format?: BinaryToTextEncoding;
    headers?: boolean | ListOrFilter;
    hostname?: boolean | FilterableSpec<string, string>;
    method?: boolean | IncludableSpec;
    pathname?: boolean | FilterableSpec<string, string>;
    port?: boolean | IncludableSpec;
    protocol?: boolean | IncludableSpec;
    query?: boolean | ListOrFilter;
    type?: string;
}

Properties

body?: boolean | FilterableSpec<Buffer, string | Buffer>

Specifies whether and how to include the body of the request in the hash. The default value is true.

customData?: any

Any custom value (which can be JSON stringified) to be added in the content to be hashed.

format?: BinaryToTextEncoding

Specifies the output format. Default value is hex. Check Node.js API for more information: https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding|hash.digest(format).

headers?: boolean | ListOrFilter

Specifies whether and how to include the headers in the hash. The default value is false.

hostname?: boolean | FilterableSpec<string, string>

Specifies whether and how to include the hostname in the hash. The default value is false.

method?: boolean | IncludableSpec

Specifies whether to include the method in the hash. The default value is false.

pathname?: boolean | FilterableSpec<string, string>

Specifies whether and how to include the pathname part of the url in the hash. The default value is false.

port?: boolean | IncludableSpec

Specifies whether to include the port in the hash. The default value is false.

protocol?: boolean | IncludableSpec

Specifies whether to include the protocol in the hash. The default value is false.

query?: boolean | ListOrFilter

Specifies whether and how to include the query part of the url in the hash. The default value is true.

type?: string

Specifies the hash algorithm. Default value is sha256. Check Node.js API for more information: https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options|crypto.createHash(type).