Class RestClient
Definition
- Assembly:
- Tizen.AIAvatar.dll
A class that provides methods to execute REST requests and handle responses.
public class RestClient : IRestClient, IDisposable
- Inheritance
-
objectRestClient
- Implements
-
IDisposable
Constructors
View SourceRestClient(HttpClient)
Initializes a new instance of the RestClient class with the specified HttpClient.
Declaration
public RestClient(HttpClient httpClient)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpClient | httpClient | The HttpClient instance to use for sending HTTP requests. |
Methods
View SourceDispose()
Disposes of the resources used by the RestClient.
Declaration
public void Dispose()
Dispose(bool)
Disposes of the resources used by the RestClient.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
ExecuteAsync(RestRequest)
Executes a REST request asynchronously and returns the response.
Declaration
public Task<RestResponse> ExecuteAsync(RestRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| RestRequest | request | The RestRequest object containing details of the request. |
Returns
| Type | Description |
|---|---|
| Task<><RestResponse> | A RestResponse object representing the result of the request. |
Implements
IDisposable