This need should be more normal, online also, but the solution is more complex, not necessarily applicable (high version ie,64 bit, etc.)
In fact, Ms Early for us to achieve, maybe we usually do not pay attention to
WebBrowser. Navigate method (Uri, String, Byte[], String)
Public void Navigate (
Uri URL,
string targetframename,
byte [] PostData,
string additionalheaders
)
Parameters
- url
-
type: System Uri
a uri , which represents the URL of the document to be loaded.
- Targetframename
-
Type: System . String
The name of the frame in which the document is to be loaded.
- PostData
-
Type: System . Byte []
HTTP POST data, such as form data.
- Additionalheaders
-
Type: System . String
The HTTP header to add to the default header.
-
How to use it:
This.webBrowser1.Navigate ("www.baidu.com", NULL, NULL, @ "content-type:application/x-www-form-urlencoded" + System.environment.newline+ "referer:http://foo.com\r\n");
With fiddler tracking, you can see the effect immediately, and the custom header takes effect.
??
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Webbrower Custom HTTP Headers