mercury tours中删除订单使用web_custom_request的问题
我参照大大们的使用web_custom_request来代替web_submit_form时,报错,哪位能帮忙看一下是哪里的问题#include "web_api.h"
Action()
{
char reqlist;
//correlate the flightID
web_reg_save_param("flightID1","LB=NAME=\"flightID\" VALUE=\"","RB=\">","ORD=1",LAST);
web_reg_save_param("flightID2","LB=NAME=\"flightID\" VALUE=\"","RB=\">","ORD=2",LAST);
web_url("welcome.pl",
"URL=http://localhost:1080/MercuryWebTours/welcome.pl?page=itinerary",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:1080/MercuryWebTours/nav.pl?page=menu&in=home",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=images/flights.gif", "Referer=http://localhost:1080/MercuryWebTours/nav.pl?page=menu&in=itinerary", ENDITEM,
"Url=images/splash_itinerary.gif", "Referer=http://localhost:1080/MercuryWebTours/itinerary.pl", ENDITEM,
LAST);
strcpy(reqlist,"1=on&flightID=");
strcat(reqlist,lr_eval_string("{flightID1}"));
strcat(reqlist,"&2=on&flightID=");
strcat(reqlist,lr_eval_string("{flightID2}"));
strcat(reqlist,"&.cgifields=1&.cgifields=2&remov");
strcat(reqlist,"eFlights.x=187&removeFlights.y=16");
lr_output_message(reqlist);
//add web_custom_request instead of web_submit_form
web_custom_request("itinerary.pl",
"Method=POST",
"URL=http://localhost:1080/MercuryWebTours/itinerary.pl",
"RecContentType=text/html",
reqlist,
"Snapshot=t6.inf",
LAST);
lr_think_time( 5 );
/*
web_submit_form("itinerary.pl",
"Snapshot=t6.inf",
ITEMDATA,
"Name=1", "Value=on", ENDITEM,
"Name=2", "Value=on", ENDITEM,
"Name=removeFlights.x", "Value=187", ENDITEM,
"Name=removeFlights.y", "Value=16", ENDITEM,
LAST);
*/
return 0;
}
运行时提示错误信息为:
Action.c(25): Notify: Parameter Substitution: parameter "flightID1" ="180709718-800-jd"
Action.c(27): Notify: Parameter Substitution: parameter "flightID2" ="263831947-1583-jd"
Action.c(31): 1=on&flightID=180709718-800-jd&2=on&flightID=263831947-1583-jd&.cgifields=1&.cgifields=2&removeFlights.x=187&removeFlights.y=16
Action.c(34): Error -27226: The "1=on&flightID=180709718-800-jd&2=on&flightID=263831947-1583-jd&.cgifields=1&.cgifields=2&removeFlights.x=187&removeFlights.y=16" argument (number 5) is unrecognized or misplaced
Action.c(34): web_custom_request("itinerary.pl") highest severity level was "ERROR", 0 body bytes, 0 header bytes
Ending action Action. up argument (number 5) is unrecognized or misplaced 参数名写错了吧
页:
[1]