|
Nakama .NET Client 3.17.0
The official Nakama and Satori .NET client.
|
HTTP Request adapter which uses the .NET HttpClient to send requests. More...
Public Member Functions | |||||||||||||
| HttpRequestAdapter (HttpClient httpClient) | |||||||||||||
| async Task< string > | SendAsync (string method, Uri uri, IDictionary< string, string > headers, byte[] body, int timeout, CancellationToken? userCancelToken) | ||||||||||||
Send a HTTP request.
| |||||||||||||
Static Public Member Functions | |
| static IHttpAdapter | WithGzip (bool decompression=false, bool compression=false) |
| A new HTTP adapter with configuration for gzip support in the underlying HTTP client. | |
| static bool | IsTransientException (Exception e) |
Properties | |
| ILogger | Logger [get, set] |
| The logger to use with the adapter. | |
| TransientExceptionDelegate | TransientExceptionDelegate [get] |
HTTP Request adapter which uses the .NET HttpClient to send requests.
Accept header is always set as 'application/json'.
|
inline |
|
inlinestatic |
|
inline |
Send a HTTP request.
| method | HTTP method to use for this request. |
| uri | The fully qualified URI to use. |
| headers | Request headers to set. |
| body | Request content body to set. |
| timeoutSec | Request timeout. |
| userCancelToken | A user-generated token that can be used to cancel the request. |
Implements Nakama.IHttpAdapter.
|
inlinestatic |
A new HTTP adapter with configuration for gzip support in the underlying HTTP client.
NOTE Decompression does not work with Mono AOT on Android.
| decompression | If automatic decompression should be enabled with the HTTP adapter. |
| compression | If automatic compression should be enabled with the HTTP adapter. |
|
getset |
The logger to use with the adapter.
Implements Nakama.IHttpAdapter.
|
get |
Implements Nakama.IHttpAdapter.