예제 #1
0
        public static async Task <T> RequestPostAsync <T>(IRequestModel model)
        {
            var postData = RequestFactory.CreatePost(model);

            return(await $"{AppConsts.Protocol}://{AppConsts.Gateway}".PostUrlEncodedAsync(postData).ReceiveJson <T>());
        }
예제 #2
0
        public static async Task <T> RequestGetAsync <T>(IRequestModel model)
        {
            var getUrl = RequestFactory.CreateGet(model);

            return(await getUrl.GetJsonAsync <T>());
        }