Class SingleClientProvider
- Namespace
- SimpleSign.Core.Http
- Assembly
- SimpleSign.Core.dll
An IHttpClientProvider that always returns one caller-owned HttpClient. The signer never disposes the wrapped client.
public sealed class SingleClientProvider : IHttpClientProvider
- Inheritance
-
SingleClientProvider
- Implements
- Inherited Members
Remarks
Use this adapter to keep using a single pre-configured HttpClient (proxies, testing, mTLS) with the provider-based signing APIs.
Constructors
SingleClientProvider(HttpClient)
Creates a provider around a single non-owned HttpClient.
public SingleClientProvider(HttpClient client)
Parameters
clientHttpClientThe client to return from GetClient(). Must not be null.
Exceptions
- ArgumentNullException
clientis null.
Methods
GetClient()
Returns an HttpClient suitable for OCSP, CRL, TSA, and AIA requests.
public HttpClient GetClient()