private static async Task <MicRestClient> CreateFromHostname(string hostname, string apiKey, HttpClient httpClient, CancellationToken cancelToken) { var manifest = await MicManifest.GetMicManifest(hostname, httpClient, cancelToken) .ConfigureAwait(continueOnCapturedContext: false); //string apiKey = manifest.ApiKeyId; var micClient = new MicRestClient(manifest, apiKey, httpClient); return(micClient); }
public static async Task <MicRestClient> CreateFromHostname( string hostname, string apiKey, CancellationToken cancelToken = default) { var handler = new MicRestHttpHandler(new HttpClientHandler()); var httpClient = new HttpClient(handler); MicRestClient micClient = await CreateFromHostname(hostname, apiKey, httpClient, cancelToken) .ConfigureAwait(continueOnCapturedContext: false); handler.MicClient = micClient; return(micClient); }
public MicRestHttpHandler(MicRestClient micClient) : base() =>