System.Net.WebRequest Members

The members of System.Net.WebRequest are listed below.

See Also: Inherited members from System.MarshalByRefObject

Protected Constructors

Public Properties

AuthenticationLevelSystem.Net.Security.AuthenticationLevel.

Gets or sets values indicating the level of authentication and impersonation used for this request.

CachePolicySystem.Net.Cache.RequestCachePolicy.

Gets or sets the cache policy for this request.

ConnectionGroupNamestring.

When overridden in a descendant class, gets or sets the name of the connection group for the request.

ContentLengthlong.

When overridden in a descendant class, gets or sets the content length of the request data being sent.

ContentTypestring.

When overridden in a descendant class, gets or sets the content type of the request data being sent.

CredentialsICredentials.

When overridden in a descendant class, gets or sets the network credentials used for authenticating the request with the Internet resource.

static
DefaultCachePolicySystem.Net.Cache.RequestCachePolicy.

Gets or sets the default cache policy for this request.

static
DefaultWebProxyIWebProxy.

Gets or sets the global HTTP proxy.

HeadersWebHeaderCollection.

When overridden in a descendant class, gets or sets the collection of header name/value pairs associated with the request.

ImpersonationLevelSystem.Security.Principal.TokenImpersonationLevel.

Gets or sets the impersonation level for the current request.

Methodstring.

When overridden in a descendant class, gets or sets the protocol method to use in this request.

PreAuthenticatebool.

When overridden in a descendant class, indicates whether to pre-authenticate the request.

ProxyIWebProxy.

When overridden in a descendant class, gets or sets the network proxy to use to access this Internet resource.

[read-only]
RequestUriUri.

When overridden in a descendant class, gets the URI of the Internet resource associated with the request.

Timeoutint.

Gets or sets the length of time, in milliseconds, before the request times out.

UseDefaultCredentialsbool.

When overridden in a descendant class, gets or sets a bool value that controls whether CredentialCache.DefaultCredentials are sent with requests.

Public Methods

Abort()

Aborts the Request

BeginGetRequestStream(AsyncCallback, object) : IAsyncResult

When overridden in a descendant class, provides an asynchronous version of the WebRequest.GetRequestStream method.

BeginGetResponse(AsyncCallback, object) : IAsyncResult

When overridden in a descendant class, begins an asynchronous request for an Internet resource.

static
Create(string) : WebRequest

Initializes a new System.Net.WebRequest instance for the specified URI scheme.

static
Create(Uri) : WebRequest

Initializes a new System.Net.WebRequest instance for the specified URI scheme.

static
CreateDefault(Uri) : WebRequest

Initializes a new System.Net.WebRequest instance for the specified URI scheme.

static
CreateHttp(string) : HttpWebRequest

Initializes a new System.Net.HttpWebRequest instance for the specified URI string.

static
CreateHttp(Uri) : HttpWebRequest

Initializes a new System.Net.HttpWebRequest instance for the specified URI.

EndGetRequestStream(IAsyncResult) : System.IO.Stream

When overridden in a descendant class, returns a System.IO.Stream for writing data to the Internet resource.

EndGetResponse(IAsyncResult) : WebResponse

When overridden in a descendant class, returns a System.Net.WebResponse.

GetRequestStream() : System.IO.Stream

When overridden in a descendant class, returns a System.IO.Stream for writing data to the Internet resource.

GetRequestStreamAsync() : System.Threading.Tasks.Task<System.IO.Stream>

When overridden in a descendant class, returns a System.IO.Stream for writing data to the Internet resource as an asynchronous operation.

GetResponse() : WebResponse

When overridden in a descendant class, returns a response to an Internet request.

GetResponseAsync() : System.Threading.Tasks.Task<WebResponse>

When overridden in a descendant class, returns a response to an Internet request as an asynchronous operation.

static
GetSystemWebProxy() : IWebProxy

Returns a proxy configured with the Internet Explorer settings of the currently impersonated user.

static
RegisterPrefix(string, IWebRequestCreate) : bool

Registers a System.Net.WebRequest descendant for the specified URI.

Protected Methods

Explicitly Implemented Interface Members

System.Runtime.Serialization.ISerializable.GetObjectData

When overridden in a descendant class, populates a System.Runtime.Serialization.SerializationInfo instance with the data needed to serialize the System.Net.WebRequest.