Skip to main content

Interface: CurlOptions

Defined in: curl.ts:10

Properties​

colorDepth?​

optional colorDepth?: CurlColorDepth

Defined in: curl.ts:26

Colours the terminal shows: 8 for the 256-colour palette, 4 for the 16 basic colours. Only used with colors (default: detected from COLORTERM, TERM and the terminal).


colors?​

optional colors?: boolean

Defined in: curl.ts:21

Colour the command with ANSI codes (default false). Stripping the codes gives exactly the uncoloured command, which stays safe to paste.


mask?​

optional mask?: Mask

Defined in: curl.ts:37

What replaces a masked value (default ***). A function receives the header, query parameter or body key name; the curl.sh attachment uses it for ${NAME} placeholders. Colours only know ***: do not combine a custom mask with colors.


maxBodyLength?​

optional maxBodyLength?: number

Defined in: curl.ts:16

Truncate the request body (and each form/field value) beyond this many characters.


multiline?​

optional multiline?: boolean

Defined in: curl.ts:31

One option per line, joined with \ continuations (default true). With false the command is a single line; notes stay on their own # lines.


redactBodyKeys?​

optional redactBodyKeys?: readonly string[]

Defined in: curl.ts:14

JSON/form body keys and multipart field names whose values are masked.


redactQueryParams?​

optional redactQueryParams?: readonly string[]

Defined in: curl.ts:12

Query parameter names whose values are masked in the URL.


skipHeaders?​

optional skipHeaders?: readonly string[]

Defined in: curl.ts:39

Header names (case-insensitive) left out of the command, e.g. ones curl adds itself.


truncationMarker?​

optional truncationMarker?: string

Defined in: curl.ts:41

Appended to a body cut by maxBodyLength (default: nothing).


truncationNote?​

optional truncationNote?: (limit, total) => string

Defined in: curl.ts:43

Text of the # note that announces a cut body (default: a note that the replay is incomplete).

Parameters​

limit​

number

total​

number

Returns​

string