Request AddSubRequest Method (String)C# API
Adds a URL to the list of sub-requests that will be fetched from the web server when this Request is sent.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.5.77 (1.0.0.0)
Syntax

public void AddSubRequest(
	string resource
)

Parameters

resource
Type: System String
The url that should be fetched.
Remarks

The sub-requests will be fetched when Send  or SendSubRequests(Response) are called.
Examples

The following example demonstrates adding a sub-request to be fetched.
Url url1 = new Url(protocol1, localhost, "/");
// Create a GET request
Request request1 = Browser.CreateRequest(HttpMethod.GET, url1, 1);

// Add a sub-request
request1.AddSubRequest("http://localhost/Themes/TestPlant/Content/images/orange_button_bg.gif");
// Send the top-level request to the server, followed by all of the sub-requests 
Response response1 = request1.Send();
See Also