Eoapi 中常见的请求体有这几种:

  1. Json
{
  "string": "test",
  "array": [{ "dom1": {}, "dom2": false, "dom3": [] }],
  "object": { "dom1": "", "dom2": 0 },
  "null": null,
  "float": 11.11,
  "int": 1,
  "boolean": false
}
  1. Form-data

有两种格式的 Form-data(表单数据),multipart/form-data 和 application/x-www-form-urlencoded;
现代浏览器中,使用表单提交请求的情况已经比较少了,所以用得比较多的是 application/x-www-form-urlencoded,但是有一个特例,如果你的请求需要上传文件,那请求体格式无疑是 multipart/form-data 了。
1.Form-data[content-type="multipart/form-data;"]

------WebKitFormBoundaryNWnXbkVpqUPjFVZq
Content-Disposition: form-data; name="multiple"

2
------WebKitFormBoundaryNWnXbkVpqUPjFVZq
Content-Disposition: form-data; name="formDataStructure"

formDataStructure
------WebKitFormBoundaryNWnXbkVpqUPjFVZq--

2.Form-data[content-type="application/x-www-form-urlencoded"]

  1. XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
  <type version="1.0">projectMember</type>
  <statusCode version="webGlobalVal">000000</statusCode>
  <memberList>
    <memberNickName/>
    <inviteCall>2177295417@qq.com</inviteCall>
    <userNickName>[\u968f\u673a]\u65e0\u5d16\u5b50</userNickName>
    <userImage/>
  </memberList>
</root>
  1. RAW
    random text string

Eoapi 是一款简单、好用的开源 API 工具,基础功能仅包括 API 文档和测试,
满足我们开发者的核心需求。

github 地址:
https://github.com/eolinker/e...

Demo 地址:
www.eoapi.io/?utm_source=sf&utm_campaign=xh&utm_content=qingqiuti


气势凌人的柿子
310 声望3 粉丝