var client = new HttpClient();
            client.BaseAddress = new Uri("http://localhost:10010/api/thirdpart/BatchOpenApp");
            var json = JsonConvert.SerializeObject(new { agentname = "代理", companyid = 189, begindate = "2015-07-01", enddate = "2015-07-20", appids = "1,2,3", appexts = "" });
            HttpContent content = new StringContent(json);
            content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
            var result = client.PostAsync("", content).Result.Content.ReadAsStringAsync().Result;

 

posted on 2015-07-08 14:27  fuyujian  阅读(184)  评论(0编辑  收藏  举报