Struct ServiceHttpClientOptions
A class to configure options for a IServiceHttpClient
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public struct ServiceHttpClientOptions
Constructors
ServiceHttpClientOptions(Boolean, Boolean, Boolean, Boolean, IRetryPolicy)
Initializes and returns an instance of ServiceHttpClientOptions.
Declaration
public ServiceHttpClientOptions(bool skipDefaultAuthentication, bool skipDefaultHeaders, bool skipErrorProcessing, bool useBaseHttpClientOnly, IRetryPolicy retryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
Boolean | skipDefaultAuthentication | Whether to skip the default authentication flow. |
Boolean | skipDefaultHeaders | Whether to fill the default headers. |
Boolean | skipErrorProcessing | Whether to skip error processing. |
Boolean | useBaseHttpClientOnly | Whether to use the base HTTP client to send requests. |
IRetryPolicy | retryPolicy | The retry policy to use for the client. |
Properties
RetryPolicy
The IRetryPolicy to be used by the client.
Declaration
public readonly IRetryPolicy RetryPolicy { get; }
Property Value
Type | Description |
---|---|
IRetryPolicy |
SkipDefaultAuthentication
Whether to skip the default authentication flow.
Declaration
public readonly bool SkipDefaultAuthentication { get; }
Property Value
Type | Description |
---|---|
Boolean |
SkipDefaultHeaders
Whether to fill the default headers.
Declaration
public readonly bool SkipDefaultHeaders { get; }
Property Value
Type | Description |
---|---|
Boolean |
SkipErrorProcessing
Whether to skip error processing.
Declaration
public readonly bool SkipErrorProcessing { get; }
Property Value
Type | Description |
---|---|
Boolean |
UseBaseHttpClientOnly
Whether to use the base IHttpClient to send requests.
Declaration
public readonly bool UseBaseHttpClientOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Default()
Initializes and returns an instance of ServiceHttpClientOptions with default settings.
Declaration
public static ServiceHttpClientOptions Default()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |
NoRetryOption()
Initializes and returns an instance of ServiceHttpClientOptions with no retry policy.
Declaration
public static ServiceHttpClientOptions NoRetryOption()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |
SkipDefaultAuthenticationOption()
Initializes and returns an instance of ServiceHttpClientOptions which skips default authentication.
Declaration
public static ServiceHttpClientOptions SkipDefaultAuthenticationOption()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |
SkipDefaultHeadersOption()
Initializes and returns an instance of ServiceHttpClientOptions which skips adding default headers.
Declaration
public static ServiceHttpClientOptions SkipDefaultHeadersOption()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |
SkipErrorProcessingOption()
Initializes and returns an instance of ServiceHttpClientOptions which skips error processing.
Declaration
public static ServiceHttpClientOptions SkipErrorProcessingOption()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |
UseBaseHttpClientOnlyOption()
Initializes and returns an instance of ServiceHttpClientOptions which uses the base IHttpClient.
Declaration
public static ServiceHttpClientOptions UseBaseHttpClientOnlyOption()
Returns
Type | Description |
---|---|
ServiceHttpClientOptions | The specific client options. |