搬砖搬砖~
Content-Type:application/x-www-form-urlencoded的请求如下

var nvc = new List<KeyValuePair<string, string>>();
nvc.Add(new KeyValuePair<string, string>("account", ""));
nvc.Add(new KeyValuePair<string, string>("password", ""));
var client = new HttpClient();
var req = new HttpRequestMessage(HttpMethod.Post, url) { Content = new FormUrlEncodedContent(nvc) };
var res = await client.SendAsync(req);
var s=await res.Content.ReadAsStringAsync();

参考资料

How to POST using HTTPclient content type = application/x-www-form-urlencoded

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-07-07
  • 2021-12-06
  • 2022-02-19
  • 2021-12-30
  • 2022-02-04
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案