WebClient Members
.NET Framework 3.5
Provides common methods for sending data to and receiving data from a resource identified by a URI.
The WebClient type exposes the following members.
| Name | Description | |
|---|---|---|
|
CancelAsync | Cancels a pending asynchronous operation. |
|
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
|
Dispose | Overloaded. Releases the resources used by the Component. |
|
DownloadData | Overloaded. Downloads with the specified URI as a Byte array. |
|
DownloadDataAsync | Overloaded. Downloads the specified resource as a Byte array. These methods do not block the calling thread. |
|
DownloadFile | Overloaded. Downloads the resource with the specified URI to a local file. |
|
DownloadFileAsync | Overloaded. Downloads the specified resource to a local file. These methods do not block the calling thread. |
|
DownloadString | Overloaded. Downloads the requested resource as a String. The resource to download may be specified as either String containing the URI or a Uri. |
|
DownloadStringAsync | Overloaded. Downloads the resource specified as a String or a Uri. These methods do not block the calling thread. |
|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.) |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
GetWebRequest | Returns a WebRequest object for the specified resource. |
|
GetWebResponse | Overloaded. Returns the WebResponse for the specified WebRequest. |
|
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
MemberwiseClone | Overloaded. |
|
OnDownloadDataCompleted | Raises the DownloadDataCompleted event. |
|
OnDownloadFileCompleted | Raises the DownloadFileCompleted event. |
|
OnDownloadProgressChanged | Raises the DownloadProgressChanged event. |
|
OnDownloadStringCompleted | Raises the DownloadStringCompleted event. |
|
OnOpenReadCompleted | Raises the OpenReadCompleted event. |
|
OnOpenWriteCompleted | Raises the OpenWriteCompleted event. |
|
OnUploadDataCompleted | Raises the UploadDataCompleted event. |
|
OnUploadFileCompleted | Raises the UploadFileCompleted event. |
|
OnUploadProgressChanged | Raises the UploadProgressChanged event. |
|
OnUploadStringCompleted | Raises the UploadStringCompleted event. |
|
OnUploadValuesCompleted | Raises the UploadValuesCompleted event. |
|
OpenRead | Overloaded. Opens a readable stream for the data downloaded from a resource with the specified URI. |
|
OpenReadAsync | Overloaded. Opens a readable stream containing the specified resource. These methods do not block the calling thread. |
|
OpenWrite | Overloaded. Opens a stream for writing data to a resource with the specified URI. |
|
OpenWriteAsync | Overloaded. Opens a stream for writing data to the specified resource. These methods do not block the calling thread. |
|
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.) |
|
UploadData | Overloaded. Uploads a data buffer to a resource with the specified URI. |
|
UploadDataAsync | Overloaded. Uploads a data buffer to a resource identified by a URI. This method does not block the calling thread. |
|
UploadFile | Overloaded. Uploads a local file to a resource with the specified URI. |
|
UploadFileAsync | Overloaded. Uploads the specified local file to the specified resource. These methods do not block the calling thread. |
|
UploadString | Overloaded. Uploads the specified string to the specified resource. |
|
UploadStringAsync | Overloaded. Uploads the specified string to the specified resource. These methods do not block the calling thread. |
|
UploadValues | Overloaded. Uploads a name/value collection to a resource with the specified URI. |
|
UploadValuesAsync | Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI. These methods do not block the calling thread. |
| Name | Description | |
|---|---|---|
|
BaseAddress | Gets or sets the base URI for requests made by a WebClient. |
|
CachePolicy | Gets or sets the application's cache policy for any resources obtained by this WebClient instance using WebRequest objects. |
|
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.) |
|
Container | Gets the IContainer that contains the Component. (Inherited from Component.) |
|
Credentials | Gets or sets the network credentials that are sent to the host and used to authenticate the request. |
|
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.) |
|
Encoding | Gets and sets the Encoding used to upload and download strings. |
|
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.) |
|
Headers | Gets or sets a collection of header name/value pairs associated with the request. |
|
IsBusy | Gets whether a Web request is in progress. |
|
Proxy | Gets or sets the proxy used by this WebClient object. |
|
QueryString | Gets or sets a collection of query name/value pairs associated with the request. |
|
ResponseHeaders | Gets a collection of header name/value pairs associated with the response. |
|
Site | Gets or sets the ISite of the Component. (Inherited from Component.) |
|
UseDefaultCredentials | Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests. |
| Name | Description | |
|---|---|---|
|
Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.) |
|
DownloadDataCompleted | Occurs when an asynchronous data download operation completes. |
|
DownloadFileCompleted | Occurs when an asynchronous file download operation completes. |
|
DownloadProgressChanged | Occurs when an asynchronous download operation successfully transfers some or all of the data. |
|
DownloadStringCompleted | Occurs when an asynchronous resource-download operation completes. |
|
OpenReadCompleted | Occurs when an asynchronous operation to open a stream containing a resource completes. |
|
OpenWriteCompleted | Occurs when an asynchronous operation to open a stream to write data to a resource completes. |
|
UploadDataCompleted | Occurs when an asynchronous data-upload operation completes. |
|
UploadFileCompleted | Occurs when an asynchronous file-upload operation completes. |
|
UploadProgressChanged | Occurs when an asynchronous upload operation successfully transfers some or all of the data. |
|
UploadStringCompleted | Occurs when an asynchronous string-upload operation completes. |
|
UploadValuesCompleted | Occurs when an asynchronous upload of a name/value collection completes. |