Skip to main content

Use custom HTTP Clients

The SDKs will be default use their own HTTP Client instance created at runtime. But it is also possible to configure the SDK to use a custom HTTP Client instance, provided to it when the SDK is initialised. This allows you to use HTTP Clients that may be setup to use proxies, provide custom telemetry or be preconfigured with global headers or configuration.

The Go SDK will accept a client that provides the same interface as the standard library's http.Client

// Your custom HTTP Client
c := &http.Client{}

opts := []sdk.SDKOption{

s := sdk.New(opts)