连续复制
一键复制
一键打包

环境变量配置

http-client.env.json

{
  "development": {
    "host": "dev.mcake.admin",
    "id-value": 12345,
    "port": 80,
    "username": "",
    "password": "",
    "my-var": "my-dev-value"
  },
  "production": {
    "host": "example.com",
    "id-value": 6789,
    "username": "",
    "password": "",
    "my-var": "my-prod-value"
  }
}

列子

### 用户登录
POST http://{{host}}/admin/login
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

username=luobing.yin&password=mcake123

> {%client.global.set("token", response.headers.valueOf('Set-Cookie').match(/token=(.*?);/)[1]);client.log(client.global.get('token'));%}
#

### 配送地图api
GET http://{{host}}:{{port}}
    /api
    /area
    /search
    /?cityId=110
    ?type=2
Referer: http://dev.mcake.admin/admin.html
Accept: */*
Cookie: token={{token}}; page-rows=10
X-Requested-With: XMLHttpRequest

### 配送地图api
GET http://{{host}}:{{port}}
    /api
    /Region
    /search
    ?spm=m-46-74-77
Referer: http://dev.mcake.admin/admin.html
Accept: */*
Cookie: token={{token}}; page-rows=10
X-Requested-With: XMLHttpRequest

level=1&pid=0