/// <summary> /// Setting with url, query and path params and toaster caption /// </summary> /// <param name="url"></param> /// <param name="queryParameters"></param> /// <param name="pathParameters"></param> /// <param name="toasterCaption"></param> public HttpSettings(string url, HttpQueryParameters queryParameters, HttpPathParameters pathParameters, string toasterCaption) { this.SetUrl(url); this.QueryParameters = queryParameters == null ? new HttpQueryParameters() : queryParameters; this.PathParameters = pathParameters == null ? new HttpPathParameters() : pathParameters; this.ToasterSettings = string.IsNullOrEmpty(toasterCaption) ? new ToasterSettings() : new ToasterSettings(toasterCaption); }
/// <summary> /// Setting with url, query and path params and toaster settings /// </summary> /// <param name="url"></param> /// <param name="queryParameters"></param> /// <param name="pathParameters"></param> /// <param name="toasterSettings"></param> public HttpSettings(string url, HttpQueryParameters queryParameters, HttpPathParameters pathParameters, ToasterSettings toasterSettings) { this.SetUrl(url); this.QueryParameters = queryParameters == null ? new HttpQueryParameters() : queryParameters; this.PathParameters = pathParameters == null ? new HttpPathParameters() : pathParameters; this.ToasterSettings = toasterSettings == null ? new ToasterSettings() : toasterSettings; }
public async Task <List <TList> > GetAll(string orderBy, string direction = "asc") { var queryParams = new HttpQueryParameters(); if (!string.IsNullOrEmpty(orderBy)) { queryParams.Add("orderBy", orderBy); } if (!string.IsNullOrEmpty(direction)) { queryParams.Add("direction", direction); } var settings = new HttpSettings($"{this.Url}", queryParams, null); return(await this.Http.Get <List <TList> >(settings)); }