文件名称:c# http请求、POST文件帮助类
文件大小:3KB
文件格式:RAR
更新时间:2019-08-10 06:25:07
http httprequest postfile post
自己封装的基于C#的发送HTTP请求。包括普通POST\GET\FILE形式。 获取HTML:var hp = new HttpHelper("http://www.cnblogs.com"); hp.Send(); 发送POST:var hp = new HttpHelper("http://www.cnblogs.com/upload",HttpMethod.POST); hp.AddPostData("uid", "123123"); hp.Send(); 表单上传文件:var http = new PostFileHelper("https://api.test.com/ferify"); http.AddText("api_key", "123123"); http.AddText("api_secret", "adsf*/12365454a6123(&*^@#%YGJK"); http.AddText("uuid", "asd8f6a51sd312323")); var bytes=new bytes[]; //文件转换成字节 http.AddFile("file1", bytes);
【文件预览】:
HttpHelper.cs
PostFileHelper.cs