WebClientSendRequest Method (WebRequest) |
Sends a GET or POST request.
Namespace:
NScrape
Assembly:
NScrape (in NScrape.dll) Version: 0.4.1.0
Syntax public WebResponse SendRequest(
WebRequest webRequest
)
Public Function SendRequest (
webRequest As WebRequest
) As WebResponse
public:
virtual WebResponse^ SendRequest(
WebRequest^ webRequest
) sealed
abstract SendRequest :
webRequest : WebRequest -> WebResponse
override SendRequest :
webRequest : WebRequest -> WebResponse
Parameters
- webRequest
- Type: NScrapeWebRequest
The request to send.
Return Value
Type:
WebResponseThe 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