随笔分类 -  Web Api 2.0

摘要:(一)、客户端的部分代码[需要添加NuGet程序包]附:Client 声明方法HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://localhost:8800/"); ... 阅读全文
posted @ 2014-09-27 16:11 Young汨 阅读(446) 评论(0) 推荐(0)
摘要:当你使用客户端发送请求 Web API 的时候,因为API 有验证,所以你的请求报文中必须有”Authorization“,那么就需要手动添加了!HttpClient client = new HttpClient();client.BaseAddress = new Uri("http://loc... 阅读全文
posted @ 2014-09-18 12:06 Young汨 阅读(4478) 评论(1) 推荐(1)