CloudflareClientOptions
Defined in: clients/cloudflare-client/dist/index.d.mts:4
Options for createCloudflareClient.
Properties
Section titled “Properties”baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: clients/cloudflare-client/dist/index.d.mts:8
Override base URL for testing. Defaults to https://api.cloudflare.com/client/v4
errors?
Section titled “errors?”
optionalerrors?:ErrorSink
Defined in: clients/cloudflare-client/dist/index.d.mts:14
Reports transport failures and unexpected 5xx. Defaults to a no-op.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: clients/cloudflare-client/dist/index.d.mts:10
Override fetch for testing. Defaults to globalThis.fetch.
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: clients/cloudflare-client/dist/index.d.mts:12
Structured logger for request/response diagnostics. Defaults to a no-op.
retries?
Section titled “retries?”
optionalretries?:number
Defined in: clients/cloudflare-client/dist/index.d.mts:16
How many times a read is sent again after a transient failure (see retryDelayMs). Defaults to 2; 0 turns it off.
retryDelayMs?
Section titled “retryDelayMs?”
optionalretryDelayMs?:number
Defined in: clients/cloudflare-client/dist/index.d.mts:18
Milliseconds before the first retry; each later one waits three times as long. Defaults to 300.
token:
string
Defined in: clients/cloudflare-client/dist/index.d.mts:6
A Cloudflare API token, sent as a bearer token.