Ejemplo n.º 1
0
        private static async Task Test()
        {
            var r = new Discovery()
            {
                BaseAddress = new Uri("http://10.0.2.2:9000/"),
            };
            var t = await r.GetApi(ApiKind.UserData);

            //var t = await r.GetService(ApiKind.UserData, ignoreCache:true);
            //var t = await r.GetServiceUri(ApiKind.Authentication, new Version("1.0"));


            //using (var client = new HttpClient { BaseAddress = new Uri("http://10.0.2.2:9000/") })
            //{
            //    client.DefaultRequestHeaders.Accept.Clear();
            //    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            //    client.DefaultRequestHeaders.Authorization = t.AuthenticationHeader();


            //    var res = await client.GetAsync("/countries");

            //}
        }