Click or drag to resize

WebClientSendRequest Method (Uri, String, Boolean)

Sends a POST request, specifying redirection.

Namespace:  NScrape
Assembly:  NScrape (in NScrape.dll) Version: 0.4.0.0
Syntax
public WebResponse SendRequest(
	Uri destination,
	string requestData,
	bool autoRedirect
)

Parameters

destination
Type: SystemUri
Specifies the destination of the request.
requestData
Type: SystemString
Contains the request data in application/x-www-form-urlencoded format.
autoRedirect
Type: SystemBoolean
true if the request should be automatically redirected; false otherwise.

Return Value

Type: WebResponse
The response from the server.

Return Value

Type: WebResponse
The response from the server.

Implements

IWebClientSendRequest(Uri, String, Boolean)
Remarks
Sends a POST request, specifying whether the request shall be automatically redirected if applicable.
Examples
var webClient = new WebClient();

var uri = new Uri( "http://www.foo.com" );
var data = "step=confirmation&rt=L&rp=%2Flogin%2Fhome&p=0&inputEmailHandle=foo&inputPassword=bar";

using ( var response = webClient.SendRequest( uri, data, false ) ) {

}
See Also