[SDK reference](index.md)

# SdkClient

**Kind:** class  
**Namespace:** `Egulu.Sdk`  

Hand-written helpers over the generated client (W42 SDK): building a PlatClient on the caller's HttpClient (from IHttpClientFactory) and waiting on an Operation through :wait.

## Methods

| Signature | Description |
|---|---|
| `PlatClient Create(HttpClient http, string token)` | Creates a client. |
| `PlatClient Create(Uri baseAddress, string token)` | Creates a client over a dedicated SocketsHttpHandler with automatic redirects disabled. |
| `IAuthenticationProvider CreateAuthenticationProvider(Uri baseAddress, string token)` | Creates an origin-pinned bearer authentication provider for baseAddress. |
| `SocketsHttpHandler CreateHandler()` | Creates an SocketsHttpHandler configured for API calls with automatic HTTP redirects disabled. |
| `bool IsAllowedBaseUri(Uri? uri)` | Checks whether uri is an allowed API base address (https://, or loopback http://). |
| `bool IsCanonicalOperationName(string? operationName)` | Checks whether operationName is a canonical project-scoped LRO resource name. |
| `Task<bool> WaitAsync(this PlatClient client, string operationName, int calls, CancellationToken ct)` | Waits until an Operation is done (see WaitForAsync). |
| `Task<V1.Projects.Item.Locations.Item.Operations.WithOperationWait.WithOperationWaitPostResponse?> WaitForAsync(this PlatClient client, string operationName, int calls, CancellationToken ct, TimeSpan? hold = null)` | Waits until an Operation is done, re-asking :wait at most calls times, and returns it. Each call holds the server for hold (default 30 s, under an HttpClient's 100 s timeout; the server caps it at 60 s). |
