|
var url = "http://api.admin.cp.cashtoutiao.com/search/keyword/search/api";
var json = new
{
userId = "134244218",
loginId = "936b0922d6db4911915d958f8d985dc23",
deviceId = "303881012040134",
versionName = "4.0.5.4",
appVersion = "57",
keyword = title,
platform = "android",
page = "0",
type = "article"
};
HttpHelper httpHelper = new HttpHelper();
var item = new HttpItem();
item.Method = "POST";
item.URL = url;
item.ContentType = "application/json";
item.PostDataType = PostDataType.String;
item.PostEncoding = Encoding.Default;
//item.PostdataByte = item.PostEncoding.GetBytes(JsonConvert.SerializeObject(json));
var ddd = JsonConvert.SerializeObject(json);
item.Postdata =ddd;
var response = httpHelper.GetHtml(item);
var result = JsonConvert.DeserializeObject<HuiSearch>(response.Html);
这里不管我用 string或者 byte[] 最后获取的 response.html 都是不正确的。。
但是我用其他的http组件是正常获取到一个 json 字符串
|
|