Table of Contents

Method CreateClient

Namespace
Zedal.Sdk
Assembly
Zedal.Sdk.dll

CreateClient(IZedalConnection, string, string, IJwtTokenRefresh)

Creates a client using an explicit transport connection.

public IZedalClient CreateClient(IZedalConnection connection, string clientName, string clientVersion, IJwtTokenRefresh tokenRefresh = null)

Parameters

connection IZedalConnection

Transport connection.

clientName string

Name of the calling client.

clientVersion string

Version of the calling client.

tokenRefresh IJwtTokenRefresh

Optional token refresh strategy.

Returns

IZedalClient

Created client instance.

CreateClient(string, string, IJwtTokenRefresh, ZedalTransport, Action<HttpClientHandler>, string)

Creates a client for production.

public IZedalClient CreateClient(string clientName, string clientVersion, IJwtTokenRefresh tokenRefresh = null, ZedalTransport transport = ZedalTransport.Auto, Action<HttpClientHandler> configureHandler = null, string proxyUrl = null)

Parameters

clientName string

Name of the calling client.

clientVersion string

Version of the calling client.

tokenRefresh IJwtTokenRefresh

Optional token refresh strategy.

transport ZedalTransport

Wire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway).

configureHandler Action<HttpClientHandler>

Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.

proxyUrl string

Optional explicit SDK-scoped proxy URL. Takes precedence over the INFOTECH_GRPC_PROXY_URL environment variable.

Returns

IZedalClient

Created client instance.

CreateClient(string, string, string, IJwtTokenRefresh, ZedalTransport, Action<HttpClientHandler>, string)

Creates a client for an explicit address.

public IZedalClient CreateClient(string address, string clientName, string clientVersion, IJwtTokenRefresh tokenRefresh = null, ZedalTransport transport = ZedalTransport.Auto, Action<HttpClientHandler> configureHandler = null, string proxyUrl = null)

Parameters

address string

Target server address.

clientName string

Name of the calling client.

clientVersion string

Version of the calling client.

tokenRefresh IJwtTokenRefresh

Optional token refresh strategy.

transport ZedalTransport

Wire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway). The explicit address is used as-is — only the transport is switched.

configureHandler Action<HttpClientHandler>

Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.

proxyUrl string

Optional explicit SDK-scoped proxy URL. Takes precedence over the INFOTECH_GRPC_PROXY_URL environment variable.

Returns

IZedalClient

Created client instance.

CreateClient(string, string, string, IEnumerable<Interceptor>, IJwtTokenRefresh, ZedalTransport, Action<HttpClientHandler>, string)

Creates a client for an explicit address with explicit interceptors.

public IZedalClient CreateClient(string address, string clientName, string clientVersion, IEnumerable<Interceptor> interceptors, IJwtTokenRefresh tokenRefresh = null, ZedalTransport transport = ZedalTransport.Auto, Action<HttpClientHandler> configureHandler = null, string proxyUrl = null)

Parameters

address string

Target server address.

clientName string

Name of the calling client.

clientVersion string

Version of the calling client.

interceptors IEnumerable<Interceptor>

Interceptors to apply to the connection.

tokenRefresh IJwtTokenRefresh

Optional token refresh strategy.

transport ZedalTransport

Wire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway). The explicit address is used as-is — only the transport is switched.

configureHandler Action<HttpClientHandler>

Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.

proxyUrl string

Optional explicit SDK-scoped proxy URL. Takes precedence over the INFOTECH_GRPC_PROXY_URL environment variable.

Returns

IZedalClient

Created client instance.