加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
crm.postman_collection.json 5.50 KB
一键复制 编辑 原始数据 按行查看 历史
无衣师尹 提交于 2024-03-11 23:02 . crm.postman_collection.json
{
"info": {
"_postman_id": "2c2a7844-30ab-405d-93d3-f530d66f0760",
"name": "crm",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "悟空登录",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"\r",
"pm.test(\"Body matches Admin-Token\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"Admin-Token\");\r",
"});\r",
"\r",
"var jsonData= pm.response.json();\r",
"token=jsonData[\"Admin-Token\"]\r",
"pm.environment.set(\"token\", token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Admin-Token",
"value": "{{token}}",
"type": "text"
},
{
"warning": "This is a duplicate header and will be overridden by the Content-Type header generated by Postman.",
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "username",
"value": "17629630517",
"type": "text"
},
{
"key": "password",
"value": "412824qaZ",
"type": "text"
}
],
"options": {
"raw": {
"language": "text"
}
}
},
"url": {
"raw": "http://192.168.0.67:8080/login",
"protocol": "http",
"host": [
"192",
"168",
"0",
"67"
],
"port": "8080",
"path": [
"login"
]
}
},
"response": []
},
{
"name": "upload",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"\r",
"\r",
"\r",
"pm.test(\"Body matches batchId\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"batchId\");\r",
"});\r",
"\r",
"pm.test(\"Body matches Admin-Token\",function(){\r",
" pm.expect(pm.response.text()).to.include('\"code\":0');\r",
"});\r",
"var jsonData = pm.response.json();\r",
"batchId=jsonData[\"batchId\"]\r",
"pm.environment.set(\"batchId\", batchId);\r",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"content-type": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Admin-Token",
"value": "{{token}}",
"type": "text"
},
{
"key": "",
"value": "",
"type": "text",
"disabled": true
},
{
"key": "Content-Type",
"value": "multipart/form-data; boundary=----WebKitFormBoundaryutmyealcptZQG4zl",
"type": "text"
},
{
"key": "cookie",
"value": "SECKEY_ABVK=2YOSRN63mgQ9/TLV/EaTf03U4JiVuxIWRjVxb5fTomA%3D; BMAP_SECKEY=eStKaZFrA4hAtoZ8qiXGcPY8P6T66UQrlyU9BNtkTgm577dhE6K3smg_6mhXBuxu5aXMuQlzrwGaV9-jVxbVAm1Hrpq8KQ1pNTH-mJ4uM1o9tOZDo5Fe0LuRSFxSV21G6bcuVGF-V6AyuWMeigOIRyMXnNSGj8saplJWbxq8bQgPXLSbTILsE7PJT5LhX4fw",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "img",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": "85F57EB4B90EA04E59E3BF116156A090.jpg"
}
]
},
"url": {
"raw": "http://192.168.0.67:8080/file/upload",
"protocol": "http",
"host": [
"192",
"168",
"0",
"67"
],
"port": "8080",
"path": [
"file",
"upload"
]
}
},
"response": []
},
{
"name": "addOrUpdate",
"event": [
{
"listen": "test",
"script": {
"exec": [
"\r",
"\r",
"// pm.test(\"Body matches Admin-Token\",function(){\r",
"// pm.expect(pm.response.text()).to.include('\"code\":0');\r",
"// });\r",
"// pm.test(\"Body matches batchId\", function () {\r",
"// pm.expect(pm.response.text()).to.include(\"batchId\");\r",
"// });\r",
"\r",
"// var jsonData = pm.response.json();\r",
"// batchId=jsonData[\"batchId\"]\r",
"// pm.environment.set(\"batchId\", batchId);\r",
"\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Admin-Token",
"value": "{{token}}",
"type": "text"
},
{
"key": "Accept",
"value": "application/json, text/plain, */*",
"type": "text"
},
{
"key": "Accept-Encoding",
"value": "gzip, deflate",
"type": "text"
},
{
"key": "Connection",
"value": "keep-alive",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8",
"type": "text"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "",
"variables": ""
}
},
"url": {
"raw": "http://192.168.0.67:8080/OaLog/addOrUpdate",
"protocol": "http",
"host": [
"192",
"168",
"0",
"67"
],
"port": "8080",
"path": [
"OaLog",
"addOrUpdate"
]
}
},
"response": []
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化