请求体格式有哪些呢?我总结了常见的这几种

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


  projectMember
  000000
  
    
    [email protected]
    [\u968f\u673a]\u65e0\u5d16\u5b50
    
  
  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

你可能感兴趣的:(api开源接口开发工具程序人生)