Loadrunner:LR提交JSON格式的POST请求

时间:2016-05-30 10:06:32   收藏:0   阅读:1972

场景:

影视分发:影院客户端向管理平台发起取任务的操作,取任务接口getDispatchTask,为JSON格式的POST请求

 

 1 Action()
 2 {
 3      web_custom_request("getdispatch",
 4         "URL=http://rct.chinanetcenter.com:60009/rctItfAgent/dispatch/getDispatchTask",     //请求的目的地址
 5         "Method=POST",      //POST请求
 6         "Resource=0",
 7         "Referer=",
 8         "mode=HTTP",
 9         "EncType=application/json",  //返回JSON格式
10         "Body={\"hcode\":\"RCT_DISPATCH1464498178829230207\"}",         //提交的JSON请求
11     LAST);
12 return 0;
13 }

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!