In postman, the difference between form-data, x-www-form-urlencoded, raw, and binary is postmanbinary.
1. form-data:
IsMultipart/form-dataIt processes the form data as a message, and uses tags as the unit, separated by delimiters. You can upload key-value pairs or files. When the uploaded field is a file, Content-Type is used to indicate the file Type of the table name. content-disposition is used to describe some information about the field;
Because of boundary isolation, multipart/form-data can both upload files and key-value pairs. multipart/form-data adopts key-value pairs, so it can upload multiple files.
2. x-www-form-urlencoded:
YesApplication/x-www-from-urlencodedTo convert the data in the form to a key-value pair, for example, name = java & age = 23
3. raw
You can upload text in any format, text, json, xml, html, etc.
4. binary
EquivalentContent-Type: application/octet-streamOnly binary data can be uploaded, which is usually used to upload files. Because there is no key value, only one file can be uploaded at a time.
Differences 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, which is converted into a message;
X-www-form-urlencoded: only key-value pairs can be uploaded, and key-value pairs are separated at intervals.