Interface CreateClientParams

Client initialization parameters

Hierarchy

  • CreateClientParams

Properties

accessToken: string

Contentful CDA Access Token

adapter?: AxiosAdapter

Optional axios request adapter (see axios docs )

application?: string

Application name and version e.g myApp/version

basePath?: string

Path appended to the host to support gateways/proxies with custom urls

environment?: string

Contentful Environment ID

Default Value

"master"
headers?: Record<string, string>

Optional additional headers

host?: string

API host. Also usable with preview.contentful.com.

Default Value

"cdn.contentful.com"
httpAgent?: any

Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)

httpsAgent?: any

Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)

insecure?: boolean

Requests will be made over http instead of the default https

Default Value

true
integration?: string

Integration name and version e.g react/version

logHandler?: ((level, data?) => void)

Type declaration

proxy?: false | AxiosProxyConfig

Optional Axios proxy (see axios docs )

retryLimit?: number

Optional number of retries before failure.

Default Value

5
retryOnError?: boolean

If we should retry on errors and 429 rate limit exceptions

Default Value

true
space: string

Space ID

timeout?: number

connection timeout in milliseconds (default:30000)