ContentstackOptions
ContentstackOptions
ContentstackOptions holds every setting of a ContentstackClient in one object, in the Contentstack.Core.Configuration namespace. Use this class to
- create a client with settings that the string constructor does not take, such as Branch, LivePreview, and EarlyAccessHeader
- bind client settings from configuration, such as an appsettings.json section, through the .NET options pattern
Set the properties, then pass the object to the ContentstackClient(ContentstackOptions options) constructor. See the ContentstackClient class page for the constructors.
| Name | Type | Description |
|---|---|---|
| ApiKey | string | API key of the stack. Sent as the api_key header. |
| DeliveryToken | string | Delivery token for the environment. Sent as the access_token header. |
| Environment | string | Environment to read published content from. |
| Region | ContentstackRegion | Region that hosts the stack. Ignored when Host holds a value. |
| Host | string | Custom delivery host, without a scheme. Overrides Region. |
| Version | string | API version path segment. The SDK uses v3 when unset. |
| Branch | string | Branch to read content from. Sent as the branch header on every request. |
| Timeout | int | Request timeout in milliseconds. |
| Proxy | WebProxy | Proxy for outgoing requests. |
| LivePreview | LivePreviewConfig | Live preview settings. Live preview stays off when unset. |
| EarlyAccessHeader | string[] | Early access feature names. Sent as one comma-separated x-header-ea header. |
| AccessToken | string | Deprecated. Use DeliveryToken. |