|
如题,对方返回信息,无法转换为图像文件
如果用postman测试是可以发送成功,图片也可以在对方软件里解析出来.
请高手赐教
代码如下(图片转base64太长没法完全粘出来)
string s64 = "";
//s64 = System.Web.HttpUtility.UrlDecode(s64, System.Text.Encoding.UTF8);
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://30.30.30.208:8090/face/create",
Method = "POST",
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
ContentType = "application/x-www-form-urlencoded",//返回类型 可选项有默认值
Postdata = "pass=12345678&personId=606886&faceId=&imgBase64=" + s64 + "&isEasyWay=false",
ResultType = ResultType.String,//返回数据类型,是Byte还是String
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
|
|