当前端在开发过程中,遇到接口错误反馈给后端人员时,一般在此接口处右键复制为cURL。
格式如下:
curl 'https://xxx.xxx.cn/xxx/xxx/management/record/list' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: zh-CN,zh;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: http://localhost:8080' \
-H 'priority: u=1, i' \
-H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'token: bearer_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'