web_add_header
功能:用于添加指定的报文头到下一次HTTP请求
格式:web_add_header( const char *Header, const char *Content ),如:web_add_header("name", "yuan-yuan")
Action():
Action()
{
char requestUrl[] = "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 ;
}
运行后,抓包分析请求的报文头: