Example #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>());
        }
Example #2
0
        public static async Task <T> RequestGetAsync <T>(IRequestModel model)
        {
            var getUrl = RequestFactory.CreateGet(model);

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