在HTTP头中,有一个参数是:Content-Type,它指明了请求体(body)中数据的格式。

Content-Type: [参数]

类型1 —— application/x-www-form-urlencoded

以键值对格式传输,&连接。

name=lisi&age=18

类型2 —— application/json; charset=utf-8

以JSON格式传输

{"bankCode":"TEST","bankAreaCode":"440305"}

类型3 —— multipart/form-data

以二进制格式传输: 如图片、文件等。上传文件使用。
image

image

还有其他类型,不一 一举例了。

posted on 2020-04-10 18:18  Mysticbinary  阅读(261)  评论(0)    收藏  举报