Action()
{
int HttpRetCode; //定义一个变量,用于接收HTTP返回的状态码
//web_add_header("Session-Id", "2e254244-93e3-416b-a3b7-1630b238a4d5"); //请求头
lr_start_transaction("热门标签");
//接口
web_submit_data("热门标签",
"Action=http://192.168.1.191:8080/tags/top", //地址
"Method=GET", //GET请求
ITEMDATA,
//传参
LAST );
HttpRetCode=web_get_int_property(HTTP_INFO_RETURN_CODE); //获取返回的状态码
if(HttpRetCode==200) //如果状态码返回200,则是成功的
{ lr_output_message("成功!");
lr_end_transaction("热门标签", LR_PASS);
}
else
{ lr_output_message("失败!");
lr_end_transaction("热门标签", LR_FAIL);
}
return 0;
}