【问题标题】:How do I send file in a PUT resquest using Postman如何使用 Postman 在 PUT 请求中发送文件
【发布时间】:2016-11-02 18:13:14
【问题描述】:

我使用邮递员测试我的 api,我需要发送一个包含 json 对象和一些文件的 PUT 请求。我发送原始数据来测试这个,但我似乎无法弄清楚如何在其中添加文件。

PUT 请求
原始数据示例:

{ 
   "email": "someone@something.com",
   "info": "new account",
   "file1" : (some file should be here),
   "file2": (some file should be here)
}

【问题讨论】:

    标签: json httprequest put postman raw-data


    【解决方案1】:

    您不应该在 PUT 请求中发送文件和数据,或者请求的主体是文件内容,或者您​​使用 POST 来拥有包含其他数据的文件的多个文件。

    老实说,我无法解释更多,因为我遇到了同样的问题 :-)

    【讨论】:

      猜你喜欢
      • 2019-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-15
      • 2012-07-09
      • 2011-01-10
      • 2021-09-05
      相关资源
      最近更新 更多