Sets a default HTTP request header for every subsequent Request
object created by this WebBrowser, as a name/value pair.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
Syntax
Parameters
- header
- Type: System String
The header to set.
- value
- Type: System String
The default value of the header.
Remarks
Examples
// Set the "Accept-Language: en-GB" HTTP header for EVERY subsequent request WebBrowser.SetDefaultHeader("Accept-Language", "en-GB"); // Create a request Request request = WebBrowser.CreateRequest(HttpMethod.GET, new Url("http://www.facilita.co.uk/")); // Override the "Accept-Language" header for this request ONLY request.SetHeader("Accept-Language", "en-US"); Response response = request.Send(); // Subsequent requests will still use the "Accept-Language: en-GB" HTTP header
See Also