ExecuteRequest function - MatheusKlauck/BaseExchange GitHub Wiki
Note: assumming T = Generic Class
protected virtual async Task<CallResult<T>> ExecuteRequest<T>(Uri uri, string method = Constants.GetMethod, Dictionary<string, object> parameters = null, bool signed = false, bool checkResult = true) where T : class
This function parameters are:
Uri uri
: here, you input the link to the server's api who you want to request data;string method (default val is "GET")
: here, you input the request's method (GET
orSET
);Dictionary<string, object> parameters (default val is null)
: here, you input the parameters, what will deepen your request;bool signed (default val is false)
: here, you inform if the request must be authenticated;bool checkResult (default val is true)
: Whether or not the resulting object should be checked for missing properties in the mapping;
The function will read your parameters and then, take the needed decisions based on this, then, will return the request in T
object format, as you informed in ExecuteRequest<T>
.