public async Task <IActionResult> GetActivo() { HttpClient client = new HttpClient(); var response = await client.GetAsync($"{UrlExtractor.ExtractBaseUrl(Request.GetDisplayUrl())}/api/reportecaso"); if (response.StatusCode == HttpStatusCode.OK) { return(Ok("API REST Activa.")); } return(Ok($"Hay un problema con el servicio. ${response.StatusCode}")); }
public void ExtractBaseUrlOk(string baseUrlExpected, string url) { Assert.Equal(baseUrlExpected, UrlExtractor.ExtractBaseUrl(url)); }