using (var http = new HttpClient(handler))
{
var content = new FormUrlEncodedContent(new Dictionary<string, string>()//.net的post请求
{
{"", condition}//键名必须为空
});
string url = apiPath;
var response = http.PostAsync(url, content).Result; //调用接口,参数content用java怎么传呢
// response.EnsureSuccessStatusCode();
// result = await response.Content.ReadAsStringAsync();
result = System.Web.HttpUtility.UrlDecode(response.Content.ReadAsStringAsync().Result).Trim('"')
那个FormUrlEncodedContent对象之后调用对象传入的content,里面啥信息呢,用java需要传什么参数呢
可以使用 WebApiClient
https://github.com/dotnetcore/WebApiClient