Export (0) Print
Expand All

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.

  NameDescription
Public method WebClient Initializes a new instance of the WebClient class.
Top

  NameDescription
Public method CancelAsync Cancels a pending asynchronous operation.
Public method 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.)
Public method Dispose Overloaded. Releases the resources used by the Component.
Public method DownloadData Overloaded. Downloads with the specified URI as a Byte array.
Public method DownloadDataAsync Overloaded. Downloads the specified resource as a Byte array. These methods do not block the calling thread.
Public method DownloadFile Overloaded. Downloads the resource with the specified URI to a local file.
Public method DownloadFileAsync Overloaded. Downloads the specified resource to a local file. These methods do not block the calling thread.
Public method 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.
Public method DownloadStringAsync Overloaded. Downloads the resource specified as a String or a Uri. These methods do not block the calling thread.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method GetWebRequest Returns a WebRequest object for the specified resource.
Protected method GetWebResponse Overloaded. Returns the WebResponse for the specified WebRequest.
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone Overloaded.
Protected method OnDownloadDataCompleted Raises the DownloadDataCompleted event.
Protected method OnDownloadFileCompleted Raises the DownloadFileCompleted event.
Protected method OnDownloadProgressChanged Raises the DownloadProgressChanged event.
Protected method OnDownloadStringCompleted Raises the DownloadStringCompleted event.
Protected method OnOpenReadCompleted Raises the OpenReadCompleted event.
Protected method OnOpenWriteCompleted Raises the OpenWriteCompleted event.
Protected method OnUploadDataCompleted Raises the UploadDataCompleted event.
Protected method OnUploadFileCompleted Raises the UploadFileCompleted event.
Protected method OnUploadProgressChanged Raises the UploadProgressChanged event.
Protected method OnUploadStringCompleted Raises the UploadStringCompleted event.
Protected method OnUploadValuesCompleted Raises the UploadValuesCompleted event.
Public method OpenRead Overloaded. Opens a readable stream for the data downloaded from a resource with the specified URI.
Public method OpenReadAsync Overloaded. Opens a readable stream containing the specified resource. These methods do not block the calling thread.
Public method OpenWrite Overloaded. Opens a stream for writing data to a resource with the specified URI.
Public method OpenWriteAsync Overloaded. Opens a stream for writing data to the specified resource. These methods do not block the calling thread.
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public method UploadData Overloaded. Uploads a data buffer to a resource with the specified URI.
Public method UploadDataAsync Overloaded. Uploads a data buffer to a resource identified by a URI. This method does not block the calling thread.
Public method UploadFile Overloaded. Uploads a local file to a resource with the specified URI.
Public method UploadFileAsync Overloaded. Uploads the specified local file to the specified resource. These methods do not block the calling thread.
Public method UploadString Overloaded. Uploads the specified string to the specified resource.
Public method UploadStringAsync Overloaded. Uploads the specified string to the specified resource. These methods do not block the calling thread.
Public method UploadValues Overloaded. Uploads a name/value collection to a resource with the specified URI.
Public method UploadValuesAsync Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI. These methods do not block the calling thread.
Top

  NameDescription
Public property BaseAddress Gets or sets the base URI for requests made by a WebClient.
Public property CachePolicy Gets or sets the application's cache policy for any resources obtained by this WebClient instance using WebRequest objects.
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property Container Gets the IContainer that contains the Component. (Inherited from Component.)
Public property Credentials Gets or sets the network credentials that are sent to the host and used to authenticate the request.
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public property Encoding Gets and sets the Encoding used to upload and download strings.
Protected property Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property Headers Gets or sets a collection of header name/value pairs associated with the request.
Public property IsBusy Gets whether a Web request is in progress.
Public property Proxy Gets or sets the proxy used by this WebClient object.
Public property QueryString Gets or sets a collection of query name/value pairs associated with the request.
Public property ResponseHeaders Gets a collection of header name/value pairs associated with the response.
Public property Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property UseDefaultCredentials Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
Top

  NameDescription
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public event DownloadDataCompleted Occurs when an asynchronous data download operation completes.
Public event DownloadFileCompleted Occurs when an asynchronous file download operation completes.
Public event DownloadProgressChanged Occurs when an asynchronous download operation successfully transfers some or all of the data.
Public event DownloadStringCompleted Occurs when an asynchronous resource-download operation completes.
Public event OpenReadCompleted Occurs when an asynchronous operation to open a stream containing a resource completes.
Public event OpenWriteCompleted Occurs when an asynchronous operation to open a stream to write data to a resource completes.
Public event UploadDataCompleted Occurs when an asynchronous data-upload operation completes.
Public event UploadFileCompleted Occurs when an asynchronous file-upload operation completes.
Public event UploadProgressChanged Occurs when an asynchronous upload operation successfully transfers some or all of the data.
Public event UploadStringCompleted Occurs when an asynchronous string-upload operation completes.
Public event UploadValuesCompleted Occurs when an asynchronous upload of a name/value collection completes.
Top

Community Additions

ADD
Show:
© 2015 Microsoft