Esempio n. 1
0
        public async Task <TResult> PostAsync <TResult>(string controller, string body, Action <HttpException> action = null)
        {
            using (var client = CreatePostHttp())
            {
                var obj = await client.AppendPath(controller).SetBody(JsonStringContent.ParseJson(body)).ExecuteAsync <TResult>(action);

                return(obj);
            }
        }
Esempio n. 2
0
 public RestClient SetBody(JsonStringContent body)
 {
     return(SetBody(body.ToHttpContent()));
 }