在Chrome开发者工具,XHR选项中,我有以下信息:
请求网址:https://pmv.geocontrol.com.br/pontovitoria/svc/json/db/listarPontosDeParada
请求有效负载: {listaIds:[216,147,607,601,79]}
我正在尝试用独特的html转换它,比如
但我收到此错误
errorClass:“javax.servlet.ServletException”, 消息:“org.postgresql.util.PSQLException:错误:语法错误在或附近”)“位置:273”
我正在使用C#开发一个应用程序,我尝试了这个帖子请求:
public async void GetList()
{
int[] list = new int[] { 216, 147, 607, 601, 79 };
var client = new HttpClient();
client.DefaultRequestHeaders.Add("User-Agent", "Other");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.IfModifiedSince = DateTime.Now;
Dictionary<string, string> bodyProperties = new Dictionary<string, string>();
int i = 0;
foreach (var pto in list)
{
bodyProperties.Add("listaIds[" + i.ToString() + "]", pto.ToString());
i++;
}
var content = new FormUrlEncodedContent(bodyProperties);
var response = await client.PostAsync("https://pmv.geocontrol.com.br/pontovitoria/svc/json/db/listarPontosDeParada", content);
var responseString = await response.Content.ReadAsStringAsync();
}
这不行。我该如何解决?
答案 0 :(得分:0)