.NET Framework Class Library
WebClient Members

Provides common methods for sending data to and receiving data from a resource identified by a URI.

The WebClient type exposes the following members.

Constructors

  NameDescription
Public methodWebClientInitializes a new instance of the WebClient class.
Top
Methods

  NameDescription
Public methodCancelAsyncCancels a pending asynchronous operation.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodDisposeOverloaded. Releases the resources used by the Component.
Public methodDownloadDataOverloaded. Downloads with the specified URI as a Byte array.
Public methodDownloadDataAsyncOverloaded. Downloads the specified resource as a Byte array. These methods do not block the calling thread.
Public methodDownloadFileOverloaded. Downloads the resource with the specified URI to a local file.
Public methodDownloadFileAsyncOverloaded. Downloads the specified resource to a local file. These methods do not block the calling thread.
Public methodDownloadStringOverloaded. Downloads the requested resource as a String. The resource to download may be specified as either String containing the URI or a Uri.
Public methodDownloadStringAsyncOverloaded. Downloads the resource specified as a String or a Uri. These methods do not block the calling thread.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetWebRequestReturns a WebRequest object for the specified resource.
Protected methodGetWebResponseOverloaded. Returns the WebResponse for the specified WebRequest.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodMemberwiseCloneOverloaded.
Protected methodOnDownloadDataCompletedRaises the DownloadDataCompleted event.
Protected methodOnDownloadFileCompletedRaises the DownloadFileCompleted event.
Protected methodOnDownloadProgressChangedRaises the DownloadProgressChanged event.
Protected methodOnDownloadStringCompletedRaises the DownloadStringCompleted event.
Protected methodOnOpenReadCompletedRaises the OpenReadCompleted event.
Protected methodOnOpenWriteCompletedRaises the OpenWriteCompleted event.
Protected methodOnUploadDataCompletedRaises the UploadDataCompleted event.
Protected methodOnUploadFileCompletedRaises the UploadFileCompleted event.
Protected methodOnUploadProgressChangedRaises the UploadProgressChanged event.
Protected methodOnUploadStringCompletedRaises the UploadStringCompleted event.
Protected methodOnUploadValuesCompletedRaises the UploadValuesCompleted event.
Public methodOpenReadOverloaded. Opens a readable stream for the data downloaded from a resource with the specified URI.
Public methodOpenReadAsyncOverloaded. Opens a readable stream containing the specified resource. These methods do not block the calling thread.
Public methodOpenWriteOverloaded. Opens a stream for writing data to a resource with the specified URI.
Public methodOpenWriteAsyncOverloaded. Opens a stream for writing data to the specified resource. These methods do not block the calling thread.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public methodUploadDataOverloaded. Uploads a data buffer to a resource with the specified URI.
Public methodUploadDataAsyncOverloaded. Uploads a data buffer to a resource identified by a URI. This method does not block the calling thread.
Public methodUploadFileOverloaded. Uploads a local file to a resource with the specified URI.
Public methodUploadFileAsyncOverloaded. Uploads the specified local file to the specified resource. These methods do not block the calling thread.
Public methodUploadStringOverloaded. Uploads the specified string to the specified resource.
Public methodUploadStringAsyncOverloaded. Uploads the specified string to the specified resource. These methods do not block the calling thread.
Public methodUploadValuesOverloaded. Uploads a name/value collection to a resource with the specified URI.
Public methodUploadValuesAsyncOverloaded. Uploads the specified name/value collection to the resource identified by the specified URI. These methods do not block the calling thread.
Top
Properties

  NameDescription
Public propertyBaseAddressGets or sets the base URI for requests made by a WebClient.
Public propertyCachePolicyGets or sets the application's cache policy for any resources obtained by this WebClient instance using WebRequest objects.
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertyCredentialsGets or sets the network credentials that are sent to the host and used to authenticate the request.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public propertyEncodingGets and sets the Encoding used to upload and download strings.
Protected propertyEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public propertyHeadersGets or sets a collection of header name/value pairs associated with the request.
Public propertyIsBusyGets whether a Web request is in progress.
Public propertyProxyGets or sets the proxy used by this WebClient object.
Public propertyQueryStringGets or sets a collection of query name/value pairs associated with the request.
Public propertyResponseHeadersGets a collection of header name/value pairs associated with the response.
Public propertySiteGets or sets the ISite of the Component. (Inherited from Component.)
Public propertyUseDefaultCredentialsGets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
Top
Events

  NameDescription
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public eventDownloadDataCompletedOccurs when an asynchronous data download operation completes.
Public eventDownloadFileCompletedOccurs when an asynchronous file download operation completes.
Public eventDownloadProgressChangedOccurs when an asynchronous download operation successfully transfers some or all of the data.
Public eventDownloadStringCompletedOccurs when an asynchronous resource-download operation completes.
Public eventOpenReadCompletedOccurs when an asynchronous operation to open a stream containing a resource completes.
Public eventOpenWriteCompletedOccurs when an asynchronous operation to open a stream to write data to a resource completes.
Public eventUploadDataCompletedOccurs when an asynchronous data-upload operation completes.
Public eventUploadFileCompletedOccurs when an asynchronous file-upload operation completes.
Public eventUploadProgressChangedOccurs when an asynchronous upload operation successfully transfers some or all of the data.
Public eventUploadStringCompletedOccurs when an asynchronous string-upload operation completes.
Public eventUploadValuesCompletedOccurs when an asynchronous upload of a name/value collection completes.
Top
See Also

Reference

Tags :


Page view tracker