DotNetBrowser  1.14
Public Member Functions | List of all members
DotNetBrowser.WPF.WPFDefaultNetworkDelegate Class Reference

Sample implemnetation of NetworkDelegate More...

Inherits DotNetBrowser.DefaultNetworkDelegate.

Public Member Functions

override bool OnAuthRequired (AuthRequiredParams parameters)
 This method is invoked when a request receives an authentication challenge and is unable to respond using cached credentials. You can use this method to handle "basic" or "digest" authentication. FYI: to test "basic" or "digest" authentication you can use http://test.webdav.org/ More...
 
- Public Member Functions inherited from DotNetBrowser.DefaultNetworkDelegate
virtual void OnBeforeURLRequest (BeforeURLRequestParams parameters)
 Fires when a request is about to occur. This event is sent before any TCP connection is made and can be used to redirect requests to another location. This method is invoked synchronously. URL request will be blocked while this method is executing. If this method throws an exception, then default behavior will be used - the target URL will not be changed. More...
 
virtual void OnBeforeRedirect (BeforeRedirectParams parameters)
 Fired when a server-initiated redirect is about to occur. This method is invoked synchronously. URL request will be blocked while this method is executing. If this method throws an exception, the loading process will not be affected. More...
 
virtual void OnBeforeSendHeaders (BeforeSendHeadersParams parameters)
 Fires when a request is about to occur and the initial headers have been prepared. It allows adding, modifying, and deleting HTTP request headers. This method is invoked synchronously. URL request will be blocked while this method is executing. If this method throws an exception, the loading process will not be affected. More...
 
virtual void OnSendHeaders (SendHeadersParams parameters)
 Fires right before the HTTP headers are sent to the network. This event is informational and it does not allow modifying HTTP headers. This method is invoked synchronously. URL request will be blocked while this method is executing. If this method throws an exception, the loading process will not be affected. More...
 
virtual void OnHeadersReceived (HeadersReceivedParams parameters)
 Fires each time that an HTTP(S) response header is received. Due to redirects and authentication requests this can happen multiple times per request. This event is intended to allow adding, modifying, and deleting HTTP response headers, such as incoming "Set-Cookie" headers. More...
 
virtual void OnResponseStarted (ResponseStartedParams parameters)
 Fires when the first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available. This event is informational. More...
 
virtual void OnDataReceived (DataReceivedParams parameters)
 Fires each time when a part of the response body is received. When the whole response body is received, OnCompleted(RequestCompletedParams) method will be fired. This event is informational. More...
 
virtual void OnCompleted (RequestCompletedParams parameters)
 Fires when a request has been processed successfully or failed. You can get information about HTTP request status via the RequestCompletedParams.GetStatus() method. If HTTP request status is RequestStatus.FAILED, you can get information about network error using the RequestCompletedParams.GetErrorCode() method. More...
 
virtual void OnDestroyed (RequestParams parameters)
 Fires when a request is being destroyed. More...
 
virtual bool OnCanSetCookies (string url, List< Cookie > cookies)
 This method is invoked when Chromium engine decides whether cookies can be saved for the url or not. Return true to allow engine to save the cookies. If you return false, the cookies will not be saved and will not be available in CookieStorage. More...
 
virtual bool OnCanGetCookies (string url, List< Cookie > cookies)
 This method is invoked when Chromium engine decides whether cookies can be sent back to the web server. Return true to allow cookies to be sent to the web server. More...
 
virtual void OnBeforeSendProxyHeaders (BeforeSendProxyHeadersParams parameters)
 The similar to OnBeforeSendHeaders(BeforeSendHeadersParams) method. Fires when proxy connection is used, after OnBeforeSendHeaders method is invoked. Provides information about proxy connection, and also allows adding, modifying, and deleting HTTP request headers. More...
 

Detailed Description

Sample implemnetation of NetworkDelegate

Member Function Documentation

override bool DotNetBrowser.WPF.WPFDefaultNetworkDelegate.OnAuthRequired ( AuthRequiredParams  parameters)
virtual

This method is invoked when a request receives an authentication challenge and is unable to respond using cached credentials. You can use this method to handle "basic" or "digest" authentication. FYI: to test "basic" or "digest" authentication you can use http://test.webdav.org/

Parameters
parametersthe authentication challenge information such as authentication scheme, URL etc. Use AuthRequiredParams.Username and AuthRequiredParams.Password to provide authentication credentials.
Returns
true when authentication must be canceled.

Reimplemented from DotNetBrowser.DefaultNetworkDelegate.