Interface IServiceHttpClientWrapper
A wrapper for "IServiceHttpClient".
Namespace: Unity.DigitalTwins.Live.Sdk.Interfaces
Assembly: solution.dll
Syntax
public interface IServiceHttpClientWrapper
Methods
DeleteAsync<T>(String, IDictionary<String, String>)
Represents the DELETE method.
Declaration
Task<Optional<T>> DeleteAsync<T>(string endpoint, IDictionary<string, string> headers = null)
Parameters
Type | Name | Description |
---|---|---|
String | endpoint | The api endpoint. |
IDictionary<String, String> | headers | The header of the HTTP request. |
Returns
Type | Description |
---|---|
Task<Optional<T>> |
Type Parameters
Name | Description |
---|---|
T | The type of returned content. |
GetAsync<T>(String, IDictionary<String, String>)
Represents the GET method.
Declaration
Task<Optional<T>> GetAsync<T>(string endpoint, IDictionary<string, string> headers = null)
Parameters
Type | Name | Description |
---|---|---|
String | endpoint | The api endpoint. |
IDictionary<String, String> | headers | The header of the HTTP request. |
Returns
Type | Description |
---|---|
Task<Optional<T>> |
Type Parameters
Name | Description |
---|---|
T | The type of returned content. |
PostAsync<T>(String, Object, IDictionary<String, String>)
Represents the POST method.
Declaration
Task<Optional<T>> PostAsync<T>(string endpoint, object payload, IDictionary<string, string> headers = null)
Parameters
Type | Name | Description |
---|---|---|
String | endpoint | The api endpoint. |
Object | payload | The body of the HTTP request. |
IDictionary<String, String> | headers | The header of the HTTP request. |
Returns
Type | Description |
---|---|
Task<Optional<T>> |
Type Parameters
Name | Description |
---|---|
T | The type of returned content. |
PutAsync<T>(String, Object, IDictionary<String, String>)
Represents the PUT method.
Declaration
Task<Optional<T>> PutAsync<T>(string endpoint, object payload, IDictionary<string, string> headers = null)
Parameters
Type | Name | Description |
---|---|---|
String | endpoint | The api endpoint. |
Object | payload | The body of the HTTP request. |
IDictionary<String, String> | headers | The header of the HTTP request. |
Returns
Type | Description |
---|---|
Task<Optional<T>> |
Type Parameters
Name | Description |
---|---|
T | The type of returned content. |