1、调用登录接口获取response数据
{
"code":0,"msg":"成功","data":{
"token":"bearereyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9tZW1iZXItYXBpLnN0MS50ZXN0LmxhbnhpbmthLmNvbVwvMi4wXC91c2Vyc1wvbG9naW4iLCJpYXQiOjE1ODYzMTEyMDUsImV4cCI6MTU4NzYwNzIwNSwibmJmIjoxNTg2MzExMjA1LCJqdGkiOiIyWWJGOTNVaVJhSDNKODkzIiwic3ViIjo1ODQ5MDIsInBydiI6IjNhN2IwNmU5NTBkMDhlMjMzMjkyMjdjN2E2YTUyMzQyYWJiNGYxOWIiLCJidXNpbmVzc190eXBlIjoiNiJ9.wrZkzkZKHoBj_cAxQzELJpm2VPWYQ"}}
2、提取response中的数据并写入到csv中
//导入json包import com.alibaba.fastjson.JSONObject;//获取获取请求的返回值String response_data = prev.getResponseDataAsString();//日志打印获取请求的返回值log.info(response_data);//将String类型的返回值构造成JSONObject对象JSONObject data_obj = JSONObject.parseObject(response_data);String msg = data_obj.get(&#