Mono Class Library: System.Net NamespaceSystem.Net.WebClient Class |
See Also: WebClient Members
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Net.WebClient
|
All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.
Note:[Edit]The System.Net.WebClient class provides common methods for sending data to or receiving data from any local, Intranet, or Internet resource identified by a URI.
The System.Net.WebClient class uses the System.Net.WebRequest class to provide access to Internet resources. System.Net.WebClient instances can access data with any class derived from System.Net.WebRequest that is registered with the WebRequest.RegisterPrefix(string, IWebRequestCreate) method.
By default, the CLI supports URIs with the "http:", "https:", and "file:" schemes.
The System.Net.WebClient class provides the following methods for uploading data to a resource.
- WebClient.OpenWrite(string) sends a System.IO.Stream to the server hosting a resource.
- WebClient.UploadData(string, Byte[]) sends a byte array to the server hosting a resource and returns a byte array containing the response from the server, if any.
- WebClient.UploadFile(string, string) sends a local file to the server hosting a resource and returns a byte array containing the response from the server, if any.
- WebClient.UploadValues(string, System.Collections.Specialized.NameValueCollection) sends a System.Collections.Specialized.NameValueCollection collection to the server hosting a resource and returns a byte array containing the response from the server, if any.
The System.Net.WebClient class also provides the following methods for downloading data from a resource.
- WebClient.DownloadData(string) downloads data from a resource and returns a byte array.
- WebClient.DownloadFile(string, string) downloads data from a resource to a local file.
- WebClient.OpenRead(string) returns the data from the resource as a System.IO.Stream.
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0