• WebAPI学习笔记(8)Postman中Binary和Form-data上传文件区别


    官方解释如下:

    Binary data

    Binary data allows you to send things which you can not enter in Postman, for example, image, audio, or video files. You can send text files as well.

    Form-data

    multipart/form-data is the default encoding a web form uses to transfer data. This simulates filling a form on a website, and submitting it. The form-data editor lets you set key-value pairs (using the data editor for your data.) It also lets you specify the content type for each part of a multi-part form request individually. You can attach files to a key as well.

    When you repeatedly make API calls that require sending these files again and again, Postman persists your file paths for subsequent use. This also helps you run collections that contain requests requiring file upload.

    Uploading multiple files each with their own Content-Type is not supported yet.

    主要区别在于:

    1. Binary每次只能传一个附件,而Form-data可以传多个。

    2. Form-data可以利用key-value对,可以分别对每个文件进行描述。

  • 相关阅读:
    C++指针详解
    C++中#include包含头文件带 .h 和不带 .h 的区别
    #if的使用说明
    非常简单的语音朗读功能
    C#基础笔记(第十一天)
    C#基础笔记(第十天)
    手机管理系统
    编程书籍大集合
    centos 安装多实例数据库
    Python3 网络爬虫(请求库的安装)
  • 原文地址:https://www.cnblogs.com/61007257Steven/p/11956379.html
Copyright © 2020-2023  润新知