Click or drag to resize

WebClientSendRequest Method (WebRequest)

Sends a GET or POST request.

Namespace:  NScrape
Assembly:  NScrape (in NScrape.dll) Version: 0.4.0.0
Syntax
public WebResponse SendRequest(
	WebRequest webRequest
)

Parameters

webRequest
Type: NScrapeWebRequest
The request to send.

Return Value

Type: WebResponse
The response from the server.

Implements

IWebClientSendRequest(WebRequest)
Remarks
Sends a GET or POST request.
Examples
var webClient = new WebClient();

var request = new PostWebRequest() {
    Destination = new Uri( "http://www.foo.com" ),
    RequestData = "step=confirmation&rt=L&rp=%2Flogin%2Fhome&p=0&inputEmailHandle=foo&inputPassword=bar"
};

using ( var response = webClient.SendRequest( request ) ) {

}
See Also