Discover LoadRunner today with two "built-in variables":
1, request, for extracting the complete header information.
2, RESPONSE, for extracting the complete response header information.
The response header information can be implemented in other ways, but the request header information is really not known to be able to get it. It's too discreet!
Note that these two variables are only used with Web_save_header registration before the request. Examples are as follows:
Action () {
Web_set_max_html_param_len ("262144");
//default maximum length is
Web_reg_save_param ("Responsebody", "lb=", "rb=", "Search=body", last);
Web_save_header (REQUEST, "Requestheader");
//Request is a built-in variable that holds the requested header information and needs to be registered before sending a URL request
Web_save_header (RESPONSE, "Responseheader");
//Response header information to save the response
Web_url ("Higkoo",
"Url=http://hi.baidu.com/higkoo",
"Resource=0",
"Reccontenttype=text/html",
"Mode=http",
last);
Lr_output_message ("# Request header information: \n%s", lr_eval_string ("{requestheader}"));
Lr_output_message ("# Response header information: \n%s", lr_eval_string ("{responseheader}"));
Lr_output_message ("# Response content Body: \n%s", lr_eval_string ("{responsebody}"));
}
LoadRunner How to obtain Web request header information: request, RESPONSE (citation)