Class RestClient<TConfig>
An abstract base class for implementing a client class which consumes a RESTful HTTP API by statically typing the available interfaces via RestInterface instances that allow the user to create and make requests to the API.
Implements
Namespace: ReqRest
Assembly: ReqRest.dll
Syntax
public abstract class RestClient<TConfig> : RestClient, IUrlProvider where TConfig : RestClientConfiguration, new()
Type Parameters
Name | Description |
---|---|
TConfig | A custom RestClientConfiguration type which is used by the deriving client. |
Constructors
RestClient(Nullable<TConfig>)
Initializes a new RestClient instance which uses the specified
configuration
.
Declaration
public RestClient(TConfig? configuration)
Parameters
Type | Name | Description |
---|---|---|
Nullable<TConfig> | configuration | The configuration for this client instance. This can be null. In this case, a new
|
Properties
Configuration
Gets or sets the configuration for this client instance.
Declaration
public TConfig Configuration { get; set; }
Exceptions
Type | Condition |
---|---|
ArgumentNullException |