Class HttpClientExtensions
Extensions that help with HttpClient operations
Inheritance
System.Object
HttpClientExtensions
Assembly: Dangl.RestClient.dll
Syntax
public static class HttpClientExtensions : object
Methods
|
Improve this Doc
View Source
GetJsonAsync<TResponse>(HttpClient, String)
Declaration
public static Task<ResponseWrapper<TResponse>> GetJsonAsync<TResponse>(this HttpClient client, string url)
Parameters
| Type |
Name |
Description |
| HttpClient |
client |
|
| System.String |
url |
|
Returns
Type Parameters
| Name |
Description |
| TResponse |
|
|
Improve this Doc
View Source
PostJsonAsync<TResponse, TPayload>(HttpClient, String, TPayload)
Declaration
public static Task<ResponseWrapper<TResponse>> PostJsonAsync<TResponse, TPayload>(this HttpClient client, string url, TPayload payload)
Parameters
| Type |
Name |
Description |
| HttpClient |
client |
|
| System.String |
url |
|
| TPayload |
payload |
|
Returns
Type Parameters
| Name |
Description |
| TResponse |
|
| TPayload |
|
|
Improve this Doc
View Source
PutJsonAsync<TResponse, TPayload>(HttpClient, String, TPayload)
Declaration
public static Task<ResponseWrapper<TResponse>> PutJsonAsync<TResponse, TPayload>(this HttpClient client, string url, TPayload payload)
Parameters
| Type |
Name |
Description |
| HttpClient |
client |
|
| System.String |
url |
|
| TPayload |
payload |
|
Returns
Type Parameters
| Name |
Description |
| TResponse |
|
| TPayload |
|