Ejemplo n.º 1
0
        public async Task <bool> Connect(string serviceUri)
        {
            client = JsonHttpClient.Create(serviceUri + baseApiPath, AddAuthorization);

            try
            {
                var result = await client.Send <string>(HttpMethod.Get, "/");

                return(result.Response.StatusCode == HttpStatusCode.OK);
            }
            catch
            {
                return(false);
            }
        }