Skip to content

[html] 第122天 说说form-data、x-www-form-urlencoded、raw、binary的区别是什么? #1069

Open
@haizhilin2013

Description

@haizhilin2013

第122天 说说form-data、x-www-form-urlencoded、raw、binary的区别是什么?

Activity

EragonBubble

EragonBubble commented on Aug 16, 2019

@EragonBubble

发送请求的方式

1.multipart/form-data 其请求内容格式为Content-Type: multipart/form-data,用来指定请求内容的数据编码格式,一般用来文件上传。
2.application/x-www-form-urlencoded 是post的默认格式,使用js中URLencode转码方法。
3.raw 可上传任意格式的文本,可以上传text、json、xml、html等各种文本类型。
4.binary 等同于Content-Type:application/octet-stream,只可上传二进制数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@EragonBubble

        Issue actions

          [html] 第122天 说说form-data、x-www-form-urlencoded、raw、binary的区别是什么? · Issue #1069 · haizlin/fe-interview