【问题标题】:Convert json request body to x-www-form-urlencoded将 json 请求正文转换为 x-www-form-urlencoded
【发布时间】:2020-08-21 21:10:33
【问题描述】:

如果我们有如下json内容类型的请求

{"name":"user","var":"foo"}

等效的x-www-form-urlencoded 将是name=user&var=foo

那么,x-www-form-urlencoded 相当于:

{"name":"user","details":{"phone":"123","city":"newyork"},"Items":["123","456"]} 

谢谢,

【问题讨论】:

    标签: json api content-type x-www-form-urlencoded


    【解决方案1】:

    你给你的例子是 urlencoded 这个:

    name=user&details[phone]=123&details[city]=newyork&Items=123,456

    【讨论】:

      猜你喜欢
      • 2018-06-11
      • 2015-08-16
      • 1970-01-01
      • 2020-10-06
      • 2019-12-04
      • 1970-01-01
      • 2021-01-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多