1.添加线程组
2.添加http请求
3.配置登陆的参数
登陆api:api/blade-auth/oauth/token
密码需要经过Md5加密后输入
4.添加http头管理器
5.配置参数
Content-Type | application/x-www-form-urlencoded | 可以防止乱码 |
---|---|---|
Authorization | Basic c2FiZXI6c2FiZXJfc2VjcmV0 | 验证用户身份 |
6.添加结果树
7.点击运行,登陆获取token
8.添加Json提取器
9.提取Json里的token
10.添加BeanShell 后置处理程序
11.配置全局变量
KaTeX parse error: Expected group after '_' at position 2: {_̲_setProperty(us…{token},)}
12.引用全局变量
${__property(user_token)}