Sys.Net.WebRequest Class
Provides client script functionality to make a Web request.
Namespace:
Sys.Net
Inherits: None
Syntax
var wRequest = new Sys.Net.WebRequest();
Constructors
Members
Remarks
The WebRequest class is used by asynchronous communication layer classes to make a Web request. You typically do not use this type directly in your applications. Instead, from the browser you call Web service methods or static page methods by using proxy methods. For more information, see Exposing Web Services to Client Script.
However, you can create and use a WebRequest instance for the following scenarios:
-
When you want to make network requests that are not simple Web service method calls.
-
When you want to set HTTP request properties directly.
-
When you are using a custom executor that is based on the Sys.Net.WebRequestExecutor class.
Example
The following example shows how to create an instance of the WebRequest class to make a GET Web request.