Use Custom HTTP Clients

Speakeasy-managed SDKs will, by default, use an Axios HTTP Client instance created at runtime. However, you can use a custom HTTP client to enable using a proxy, enable custom telemetry, or use preconfigured global headers or additional configuration.

You can provide a custom client when you initialize the SDK.

See below for per-language examples:

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

// Your custom HTTP client
c := &http.Client{}
opts := []sdk.SDKOption{
s := sdk.New(opts)