The WebClient type exposes the following members.
Constructors
Name | Description | |
---|---|---|
WebClient()()()() |
Initializes a new instance of the WebClient class.
| |
WebClient(HttpRequestCreator) |
Initializes a new instance of the WebClient class with specified HTTP request creator.
This enables sharing keep-alive connections between instances of WebClient and WebRequest.
However please note that Settings, LogWriter and ValidatingCertificate properties
are shared between all instances as well. This means that changing such property affects behavior of all instances as well.
|
Methods
Name | Description | |
---|---|---|
Cancel |
Cancels all currently running requests.
| |
Dispose |
Disposes the WebClient object.
| |
DownloadData(String) |
Downloads data from provided URI.
| |
DownloadData(Uri) |
Downloads data from provided URI.
| |
DownloadFile(String, String) |
Downloads data from provided URI and save them to the file.
| |
DownloadFile(Uri, String) |
Downloads data from provided URI and save them to the file.
| |
DownloadString(String) |
Downloads a resource from provided URI as a string.
| |
DownloadString(Uri) |
Downloads a resource from provided URI as a string.
| |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
GetHeaders(String) |
Downloads headers for provided URI using HEAD request.
| |
GetHeaders(Uri) |
Downloads headers for provided URI using HEAD request.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OpenRead(String) |
Opens a stream that contains data retrieved from provided URI.
| |
OpenRead(Uri) |
Opens a stream that contains data retrieved from provided URI.
| |
OpenWrite(String) |
Opens a stream that is used to send data to provided URI.
| |
OpenWrite(Uri) |
Opens a stream that is used to send data to provided URI.
| |
OpenWrite(String, String) |
Opens a stream that is used to send data to provided URI.
| |
OpenWrite(Uri, String) |
Opens a stream that is used to send data to provided URI.
| |
SetSocketFactory |
Sets the socket factory to be used to create communication sockets.
| |
ToString | Returns a String that represents the current Object. (Inherited from Object.) | |
UploadData(String, array<Byte>[]()[][]) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadData(Uri, array<Byte>[]()[][]) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadData(String, String, array<Byte>[]()[][]) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadData(Uri, String, array<Byte>[]()[][]) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadFile(String, String) |
Uploads a file to provided URI and returns a response data of the upload operation.
| |
UploadFile(Uri, String) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadFile(String, String, String) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadFile(Uri, String, String) |
Uploads a data to provided URI and returns a response data of the upload operation.
| |
UploadString(String, String) |
Uploads a string to provided URI as a new resource.
| |
UploadString(Uri, String) |
Uploads a string to provided URI as a new resource.
| |
UploadString(String, String, String) |
Uploads a string to provided URI as a new resource.
| |
UploadString(Uri, String, String) |
Uploads a string to provided URI as a new resource.
| |
UploadValues(String, NameValueCollection) |
Uploads a name/value collection to a specified URI.
| |
UploadValues(Uri, NameValueCollection) |
Uploads a name/value collection to a specified URI.
| |
UploadValues(String, String, NameValueCollection) |
Uploads a name/value collection to a specified URI.
| |
UploadValues(Uri, String, NameValueCollection) |
Uploads a name/value collection to a specified URI.
|
Properties
Name | Description | |
---|---|---|
BaseAddress |
Gets or sets the base address to simplify multiple requests to one server.
| |
Credentials |
Get or sets network credentials to identify a user.
| |
Encoding |
Gets or sets the encoding to be used for string upload and download.
| |
Headers |
Get or sets a collection of HTTP headers to send with a request.
| |
LogWriter |
Gets or sets the LogWriter used by this object.
| |
Proxy |
Gets or sets the network proxy to use to access a remote server.
| |
ResponseHeaders |
Gets or sets a collection of HTTP headers associated with the response.
| |
Settings |
Gets TLS/SSL settings.
| |
Timeout |
Gets or sets the length of time in milliseconds before the request times out
(specify -1 or 0 to indicate that the request does not time out; minimal value is 1000).
|
Events
Name | Description | |
---|---|---|
DownloadProgressChanged |
Occurs when download progress has changed.
| |
UploadProgressChanged |
Occurs when upload progress has changed.
| |
ValidatingCertificate |
Occurs when a server certificate needs to be validated.
|