最近在测试linux下基于curl命令的数据接口:
curlhttp://192.168.xxx.xxx:8080/flashbot/default-d "{\"request\":\"RULE\",\"device\":\"FB4SGBYBAR4GY\",\"param\":{\"id\":0}}"
当时本来想用http协议录制没有成功,直接写shell脚本在linux下测试,但是不能测试并发,只能串行执行循环
最后的解决办法是自己写请求:
web_custom_request("web_custom_request",
"Method=POST",
"Resource=1",
"URL=http://192.168.xxx.xxx:8080/flashbot/default",
"RecContentType=application/json",
"EncType=application/json",
"Body={\"request\":\"RULE\",\"device\":\"FB4SGBYBAR4GY\",\"param\":{\"id\":0}}",
LAST);
注意点:Method=POST,RecContentType=application/json