Click or drag to resize

IWebClientSendRequest Method (WebRequest)

Sends a GET or POST request.

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

Parameters

webRequest
Type: NScrapeWebRequest
The request to send.

Return Value

Type: WebResponse
The response from the server.
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