Sys.Net.WebRequest invoke Method

Executes a Web request.

Sys.Net.WebRequestManager.invoke(WebRequest);

Exceptions

Exception type

Condition

Sys.InvalidOperationException

invoke has been called more than one time.

Remarks

If you have registered a completed request event handler for the Sys.Net.WebRequest instance, that handler is called asynchronously by the network stack as the request progresses. Calling invoke more than one time for the same WebRequest instance throws an exception if the executor has already issued the network request.

Example

The following example uses the invoke method to execute a Web request. This code is part of a complete example found in the WebRequest class overview.

// Execute the request.
wRequest.invoke();  

See Also

Reference

Sys.Net.WebRequestManager Class

Sys.Net.WebRequestExecutor Class

Sys.Net.XMLHttpExecutor Class