1.用Form集合获取。 

客户端提交请求

提交内容: A=XX&B=XX。

Content-Type : application/x-www-form-urlencoded。

服务端获取:

使用Request.Form获取集合

2. 用Request.InputStream获取Body的内容

客户端提交请求

提交内容: 任何字符串,可为文本内容、json或xml。

Content-Type : 根据内容选择application/json 、application/text/plain或者 application/xml。

服务端获取:

string body = new StreamReader(Request.InputStream).ReadToEnd();

根据需要解析body字符串。

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-07-18
  • 2022-12-23
相关资源
相似解决方案