Class HttpService
Inheritance
System.Object
HttpService
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: mix.shared.dll
Syntax
Constructors
|
Improve this Doc
View Source
HttpService(IHttpClientFactory)
Declaration
public HttpService(IHttpClientFactory httpClientFactory)
Parameters
Type |
Name |
Description |
IHttpClientFactory |
httpClientFactory |
|
Methods
|
Improve this Doc
View Source
DeleteAsync(String, List<KeyValuePair<String, String>>, String, List<KeyValuePair<String, String>>)
Declaration
public Task DeleteAsync(string requestUrl, List<KeyValuePair<string, string>> queryParams = null, string bearerToken = null, List<KeyValuePair<string, string>> requestHeaders = null)
Parameters
Type |
Name |
Description |
System.String |
requestUrl |
|
List<KeyValuePair<System.String, System.String>> |
queryParams |
|
System.String |
bearerToken |
|
List<KeyValuePair<System.String, System.String>> |
requestHeaders |
|
Returns
|
Improve this Doc
View Source
DownloadAsync(String, String, String, String, IProgress<Int32>, CancellationToken)
Declaration
public Task<string> DownloadAsync(string downloadUrl, string folder, string fileName, string extension, IProgress<int> progress, CancellationToken token)
Parameters
Type |
Name |
Description |
System.String |
downloadUrl |
|
System.String |
folder |
|
System.String |
fileName |
|
System.String |
extension |
|
IProgress<System.Int32> |
progress |
|
CancellationToken |
token |
|
Returns
Type |
Description |
Task<System.String> |
|
|
Improve this Doc
View Source
GetAsync<T>(String, List<KeyValuePair<String, String>>, String, List<KeyValuePair<String, String>>)
Declaration
public Task<T> GetAsync<T>(string requestUrl, List<KeyValuePair<string, string>> queryParams = null, string bearerToken = null, List<KeyValuePair<string, string>> requestHeaders = null)
Parameters
Type |
Name |
Description |
System.String |
requestUrl |
|
List<KeyValuePair<System.String, System.String>> |
queryParams |
|
System.String |
bearerToken |
|
List<KeyValuePair<System.String, System.String>> |
requestHeaders |
|
Returns
Type Parameters
|
Improve this Doc
View Source
PostAsync<T, T1>(String, T1, String, List<KeyValuePair<String, String>>, String)
Declaration
public Task<T> PostAsync<T, T1>(string requestUrl, T1 body, string bearerToken = null, List<KeyValuePair<string, string>> requestHeaders = null, string contentType = "application/json")
Parameters
Type |
Name |
Description |
System.String |
requestUrl |
|
T1 |
body |
|
System.String |
bearerToken |
|
List<KeyValuePair<System.String, System.String>> |
requestHeaders |
|
System.String |
contentType |
|
Returns
Type Parameters