WebClient Class
This class provides common methods for sending data to and receiving data from a resource identified by a URI.
Namespace: elsystem
Properties
Additional
properties, methods, and events are described in the classes listed
under Inheritance Hierarchy (see below).
Name | Type | Description | |
![]() |
Credentials | object | Gets or sets the NetworkCredential. |
![]() |
Headers | object | Gets or sets the collection of headers. See WebHeaderCollection. |
![]() |
IsBusy | bool | Gets the status of a request. True if a request is in progress; false otherwise. |
![]() |
Proxy | object | Gets or sets the WebProxy to be used in communication with remote servers. |
![]() |
QueryString | object | Gets or sets the NameValueCollection that contains the query name/value pairs. |
![]() |
ResponseHeaders | object | Gets the collection of response headers. See WebHeaderCollection. |
![]() |
UserDefaultCredentials | bool | Gets or sets a Boolean value that indicates whether default system credentials are used as the security context of the WebClient. |
Methods
Name | Description | |
![]() |
CancelAsync() | Cancels any asynchronous operation that is pending. |
![]() |
Create() | Initializes a new instance of the class. |
![]() |
DownloadData( address ) | Downloads data from the address that is specified by the address string. The downloaded data is returned as a Vector of bytes. NOTE: This method blocks the executing thread while downloading. Consider DownloadDataAsync (see below) as a non-blocking alternative. |
![]() |
DownloadData( URIObject ) | Downloads data from resource specified by the URI argument. |
![]() |
DownloadDataAsync(URIObject, UserToken) | Downloads data from the rsource specified by the URI. The downloaded data is returned as a Vector of bytes. NOTE: When calling this method, a good practice is to pass an object that uniquely identifies the download request as the UserToken. This object will be part of the arguments provided by the DownloadDataCompletedEventArgs. |
![]() |
DownloadString(address) | Downloads information from the resource specified by the address string. The downloaded data is returned as a (potentially large) string. NOTE: This method blocks the executing thread while downloading. Consider using DownloadStringAsync() (see below) as a non-blocking alternative. |
![]() |
DownloadString(URIObject) | Downloads information from the resource specified by the URI. The downloaded data is returned as a (potentially large) string. NOTE: This method blocks the executing thread while downloading. Consider using DownloadStringAsync() (see below) as a non-blocking alternative. |
![]() |
DownloadStringAsync(address, userToken) | Downloads information from the location specified in the address string. The downloaded data is returned as a (potentially large) string. When calling this method, a good practice is to pass an object that uniquely identifies the download request as the userToken. This object will be part of the arguments provided by the DownloadStringCompletedEventArgs. |
![]() |
ParseJSON(json) | This method parses a json string and returns one of three possible output formats. This method could return a string, a Dictionary (representing the properties of a single object), or a Vector of Dictionaries (representing an array of objects). Check the type of the object that is returned by this method. See istype. |
![]() |
UploadData(address, data) | Uploads a data buffer (a Vector) to a resource at the specified address. NOTE: This method blocks the executing thread while downloading. Consider using UploadDataAsync() (see below) as a non-blocking alternative. |
![]() |
UploadData(address, verb, data) | Uploads a data buffer (a Vector) to the resource at the specified address. If the verb is NULL then POST is used by default for http addresses and STOR is used by default for FTP addresses. NOTE: This method blocks the executing thread while downloading. Consider using UploadDataAsync() (see below) as a non-blocking alternative. |
![]() |
UploadDataAsync( URIObject, verb, data, userToken) | Uploads a data buffer (a Vector) to the resource at the specified URI. If the verb is NULL then POST is used by default for http addresses and STOR is used by default for FTP addresses. When calling this method, a good practice is to pass an object that uniquely identifies the download request as the userToken. This object will be part of the arguments provided by the DownloadDataCompletedEventArgs. |
![]() |
UploadString(address, data) | Uploads the specified sting (data) to the resource at the specified address. NOTE: This method blocks the executing thread while downloading. Consider using UploadStringAsync() (see below) as a non-blocking alternative. |
![]() |
UploadString(address, verb, data) | Uploads the specified string (data) to the resource at the specified address. If the verb is NULL then POST is used by default for http addresses and STOR is used by default for FTP addresses. NOTE: This method blocks the executing thread while downloading. Consider using UploadStringAsync() (see below) as a non-blocking alternative. |
![]() |
UploadStringAsync(URIObject, verb, data, userToken) | Uploads string data to a resource at the location specified by the URI. If the verb is NULL then POST is used by default for http addresses and STOR is used by default for FTP addresses. The userToken is any user-defined object. It will be passed to the event handler invoked when the asynchronous upload completes. |
![]() |
UploadStringAsync(URIObject, data) | Uploads string data to a resource at the location specified by the URI . |
Events
Name | Description | |
![]() |
DownloadDataCompleted | Occurs when an asynchronous data download is completed. |
![]() |
DownloadStringCompleted | Occurs when an asynchronous string download is completed. |
![]() |
UploadDataCompleted | Occurs when an asynchronous data upload is completed. |
![]() |
UploadStringCompleted | Occurs when an asynchronous string upload is completed. |