public IEnumerable <City> GetCity(string suggestion) { return(JsonClient.Get <City[]>($"/Suggestions?query={suggestion}&maxChoices=50")); }
public ActionResult GetProducts() { var collection = _jsonClient.Get <List <ApiResponseProduct> >(ApiEndpoint.DefaultApi + "api/v1/products"); return(Json(collection ?? new List <ApiResponseProduct>(), JsonRequestBehavior.AllowGet)); }
private static VersionJson GetVersion(IJsonClient restClient, Uri appRoot) { return(restClient.Get <VersionJson>( $"{appRoot}__version.js", useDefaultCredentials: true)); }
private static IEnumerable <HealthCheck> GetChecks(IJsonClient restClient, Uri check) { return(restClient.Get <IEnumerable <HealthCheck> >(check.ToString(), useDefaultCredentials: true)); }
public static string Random() { return(HttpUtility.HtmlDecode(JsonClient.Get <Joke>("").Value.Joke)); }