HttpClient client = new HttpClient();
//使用FormUrlEncodedContent做HttpContent
var content = new FormUrlEncodedContent(new Dictionary<string, string>()
{
{ "q", name},
{ "from", "zh"},
{ "to", "en"}
});
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsAsync<MessageJson2>();

 

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2021-12-28
  • 2022-01-20
  • 2022-02-21
  • 2021-12-24
  • 2021-12-30
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案