The difference between form data, x-www-form-urlencoded, raw and binary in postman — transfer

Original address: http://blog.csdn.net/ye1992/article/details/49998511

1、form-data:

It is the multipart / form data in the HTTP request. It will process the form data into a message, with labels as units and separators. You can upload both key value pairs and files. When the uploaded field is a file, there will be content type to the table name file type; Content disposition, used to describe some information of the field;

Due to boundary isolation, multipart / form data can upload both files and key value pairs. It adopts the method of key value pairs, so multiple files can be uploaded.

2、x-www-form-urlencoded:

Application / x-www-from-urlencoded will convert the data in the form into key value pairs, for example, name = Java & age = 23

3、raw

You can upload text in any format, text, JSON, XML, HTML, etc

4、binary

It is equivalent to content type: application / octet stream. From the literal meaning, only binary data can be uploaded. It is usually used to upload files. Since there is no key value, only one file can be uploaded at a time.

Difference between multipart / form data and x-www-form-urlencoded

Multipart / form data: you can upload binary data such as files or form key value pairs, but it will be converted into a piece of information in the end;

X-www-form-urlencoded: only key value pairs can be uploaded, and the key value pairs are separated.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>