loadRunner函数之web_add_header
web_add_header
功能:用于添加指定的报文头到下一次HTTP请求
格式:web_add_header( const char *Header, const char *Content ),如:web_add_header("name", "yuan-yuan")
Action():
Action() { char requestUrl[1024] = "URL=http://www.cnblogs.com/yuan-yuan/"; // 添加报文头,格式:key,value web_add_header("name", "yuan-yuan"); web_custom_request("webAddHeaderTest", "Method=POST", "RecContentType=text/html", requestUrl, LAST); return 0; }
运行后,抓包分析请求的报文头: