ConcurrentRequestSender SendRequests Method C# API
Sends a list of Request objects to the web server in parallel. A list containing the Response objects will be returned, in the order in which they were received.

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

public void SendRequests()
Examples

The following example demonstrates sending 4 requests concurrently.
// Send 4 requests concurrently 
using (ConcurrentRequestSender requestSender = new ConcurrentRequestSender())) {
    requestSender.AddRequest(WebBrowser.CreateRequest(HttpMethod.GET, new Url("http://localhost:32144/Themes/TestPlant/Content/images/orange_button_bg.gif")));
    requestSender.AddRequest(WebBrowser.CreateRequest(HttpMethod.GET, new Url("http://localhost:32144/Themes/TestPlant/Content/images/bg_maincolumn_3.gif")));
    requestSender.AddRequest(WebBrowser.CreateRequest(HttpMethod.GET, new Url("http://localhost:32144/Themes/TestPlant/Content/images/logo-reflection.gif")));
    requestSender.AddRequest(WebBrowser.CreateRequest(HttpMethod.GET, new Url("http://localhost:32144/Themes/TestPlant/Content/images/ico-register.gif")));
    requestSender.SendRequests();
    List<Response> responses = requestSender.GetResponses();
}
See Also