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
connectionIZedalConnectionTransport connection.
clientNamestringName of the calling client.
clientVersionstringVersion of the calling client.
tokenRefreshIJwtTokenRefreshOptional 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
clientNamestringName of the calling client.
clientVersionstringVersion of the calling client.
tokenRefreshIJwtTokenRefreshOptional token refresh strategy.
transportZedalTransportWire transport (defaults to Auto: probes HTTP/2 once, downgrades to gRPC-Web only on a proven HTTP/1.x-only backend with a gateway).
configureHandlerAction<HttpClientHandler>Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.
proxyUrlstringOptional explicit SDK-scoped proxy URL. Takes precedence over the
INFOTECH_GRPC_PROXY_URLenvironment 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
addressstringTarget server address.
clientNamestringName of the calling client.
clientVersionstringVersion of the calling client.
tokenRefreshIJwtTokenRefreshOptional token refresh strategy.
transportZedalTransportWire 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
addressis used as-is — only the transport is switched.configureHandlerAction<HttpClientHandler>Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.
proxyUrlstringOptional explicit SDK-scoped proxy URL. Takes precedence over the
INFOTECH_GRPC_PROXY_URLenvironment 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
addressstringTarget server address.
clientNamestringName of the calling client.
clientVersionstringVersion of the calling client.
interceptorsIEnumerable<Interceptor>Interceptors to apply to the connection.
tokenRefreshIJwtTokenRefreshOptional token refresh strategy.
transportZedalTransportWire 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
addressis used as-is — only the transport is switched.configureHandlerAction<HttpClientHandler>Optional hook to configure the HttpClientHandler (e.g. proxy) shared by the Auto probe and the channel.
proxyUrlstringOptional explicit SDK-scoped proxy URL. Takes precedence over the
INFOTECH_GRPC_PROXY_URLenvironment variable.
Returns
- IZedalClient
Created client instance.