TCnWebClient Class

Provides common methods for sending data to and receiving data from a resource identified by a URI.

Namespace: CNClrLib.Component.WebClient
TComponent
  CNClrLib.Control.Base.TClrBaseComponent
    CNClrLib.Component.WebClient.TCnWebClient
type
 TCnWebClient = class(TClrBaseComponent)
 end;

The TCnWebClient type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates and initializes a TCnWebClient instance. (Overrides TClrBaseComponent.Create(TComponent).)

Destroy

Frees the resources allocated with a TCnWebClient instance. (Overrides TClrBaseComponent.Destroy.)

Top
Show:
 NameDescription
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.

Credentials

Gets or sets the network credentials that are sent to the host and used to authenticate the request.

DefaultClrObject

Get the common language runtime object interface for this component. (Inherited from TClrBaseComponent.)

Encoding

Gets and sets the Encoding used to upload and download strings.

HeaderCollection

Gets or sets a collection of header name/value pairs associated with the request.

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.

QueryStringCollection

Gets or sets a collection of query name/value pairs associated with the request.

ResponseHeaderCollection

Gets a collection of header name/value pairs associated with the response.

UseDefaultCredentials

Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.

Top
Show:
 NameDescription
CancelAsync

Cancels a pending asynchronous operation.

Dispose

Releases the resources used by the Component. (Inherited from TClrBaseComponent.)

DoGetDefaultClrObject

Represents method DoGetDefaultClrObject. (Inherited from TClrBaseComponent.)

DoGetDotNetBaseComponent

Represents method DoGetDotNetBaseComponent. (Overrides TClrBaseComponent.DoGetDotNetBaseComponent.)

DoOnHeaderChange(TObject)

Represents method DoOnHeaderChange(TObject).

DoOnQueryStringChange(TObject)

Represents method DoOnQueryStringChange(TObject).

DownloadData(String)

Overloaded. Downloads the resource as a Byte array from the URI specified.

DownloadData(_Uri)

Overloaded. Downloads the resource as a Byte array from the URI specified.

DownloadDataAsync(_Uri)

Overloaded. Downloads the resource as a Byte array from the URI specified as an asynchronous operation.

DownloadDataAsync(_Uri,Olevariant)

Overloaded. Downloads the resource as a Byte array from the URI specified as an asynchronous operation.

DownloadDataTaskAsync(String)

Overloaded. Downloads the resource as a Byte array from the URI specified as an asynchronous operation using a task object.

DownloadDataTaskAsync(_Uri)

Overloaded. Downloads the resource as a Byte array from the URI specified as an asynchronous operation using a task object.

DownloadFile(String,String)

Overloaded. Downloads the resource with the specified URI to a local file.

DownloadFile(_Uri,String)

Overloaded. Downloads the resource with the specified URI to a local file.

DownloadFileAsync(_Uri,String)

Overloaded. Downloads, to a local file, the resource with the specified URI. This method does not block the calling thread.

DownloadFileAsync(_Uri,String,Olevariant)

Overloaded. Downloads, to a local file, the resource with the specified URI. This method does not block the calling thread.

DownloadFileTaskAsync(String,String)

Overloaded. Downloads the specified resource to a local file as an asynchronous operation using a task object.

DownloadFileTaskAsync(_Uri,String)

Overloaded. Downloads the specified resource to a local file as an asynchronous operation using a task object.

DownloadString(String)

Overloaded. Downloads the requested resource as a String. The resource to download is specified as a String containing the URI.

DownloadString(_Uri)

Overloaded. Downloads the requested resource as a String. The resource to download is specified as a Uri.

DownloadStringAsync(_Uri)

Overloaded. Downloads the resource specified as a Uri. This method does not block the calling thread.

DownloadStringAsync(_Uri,Olevariant)

Overloaded. Downloads the specified string to the specified resource. This method does not block the calling thread.

DownloadStringTaskAsync(String)

Overloaded. Downloads the resource as a String from the URI specified as an asynchronous operation using a task object.

DownloadStringTaskAsync(_Uri)

Overloaded. Downloads the resource as a String from the URI specified as an asynchronous operation using a task object.

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

Notification(TComponent,TOperation)

Represents method Notification(TComponent,TOperation).

OpenRead(String)

Overloaded. Opens a readable stream for the data downloaded from a resource with the URI specified as a String.

OpenRead(_Uri)

Overloaded. Opens a readable stream for the data downloaded from a resource with the URI specified as a Uri.

OpenReadAsync(_Uri)

Overloaded. Opens a readable stream containing the specified resource. This method does not block the calling thread.

OpenReadAsync(_Uri,Olevariant)

Overloaded. Opens a readable stream containing the specified resource. This method does not block the calling thread.

OpenReadTaskAsync(String)

Overloaded. Opens a readable stream containing the specified resource as an asynchronous operation using a task object.

OpenReadTaskAsync(_Uri)

Overloaded. Opens a readable stream containing the specified resource as an asynchronous operation using a task object.

OpenWrite(String)

Overloaded. Opens a stream for writing data to the specified resource.

OpenWrite(String,String)

Overloaded. Opens a stream for writing data to the specified resource, using the specified method.

OpenWrite(_Uri)

Overloaded. Opens a stream for writing data to the specified resource.

OpenWrite(_Uri,String)

Overloaded. Opens a stream for writing data to the specified resource, by using the specified method.

OpenWriteAsync(_Uri)

Overloaded. Opens a stream for writing data to the specified resource. This method does not block the calling thread.

OpenWriteAsync(_Uri,String)

Overloaded. Opens a stream for writing data to the specified resource. This method does not block the calling thread.

OpenWriteAsync(_Uri,String,Olevariant)

Overloaded. Opens a stream for writing data to the specified resource, using the specified method. This method does not block the calling thread.

OpenWriteTaskAsync(String)

Overloaded. Opens a stream for writing data to the specified resource as an asynchronous operation using a task object.

OpenWriteTaskAsync(String,String)

Overloaded. Opens a stream for writing data to the specified resource as an asynchronous operation using a task object.

OpenWriteTaskAsync(_Uri)

Overloaded. Opens a stream for writing data to the specified resource as an asynchronous operation using a task object.

OpenWriteTaskAsync(_Uri,String)

Overloaded. Opens a stream for writing data to the specified resource as an asynchronous operation using a task object.

RegisterEventCallBack(ClrWString,Pointer)

Add an event to the instance using the specified event name and function pointer which is the event handler. The RegisterEventCallBack method does not directly add the event handler to the event. A hooking mechanism is used such that if the event is fired, the hook event is also fired which in turn calls the function pointer. (Inherited from TClrBaseComponent.)

RegisterEventSource

Register the Delphi object which will raise the .Net event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventCallBack(ClrWString,Pointer)

Remove an event from the instance using the specified event name and function pointer which is the event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventSource

Unregister the Delphi object which raised the .Net event handler. (Inherited from TClrBaseComponent.)

UploadData(String,String,TArray)

Overloaded. Uploads a data buffer to the specified resource, using the specified method.

UploadData(String,String,_ByteArray)

Overloaded. Uploads a data buffer to the specified resource, using the specified method.

UploadData(String,TArray)

Overloaded. Uploads a data buffer to a resource identified by a URI.

UploadData(String,_ByteArray)

Overloaded. Uploads a data buffer to a resource identified by a URI.

UploadData(_Uri,String,TArray)

Overloaded. Uploads a data buffer to the specified resource, using the specified method.

UploadData(_Uri,String,_ByteArray)

Overloaded. Uploads a data buffer to the specified resource, using the specified method.

UploadData(_Uri,TArray)

Overloaded. Uploads a data buffer to a resource identified by a URI.

UploadData(_Uri,_ByteArray)

Overloaded. Uploads a data buffer to a resource identified by a URI.

UploadDataAsync(_Uri,String,TArray)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the specified method. This method does not block the calling thread.

UploadDataAsync(_Uri,String,TArray,Olevariant)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the specified method and identifying token.

UploadDataAsync(_Uri,String,_ByteArray)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the specified method. This method does not block the calling thread.

UploadDataAsync(_Uri,String,_ByteArray,Olevariant)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the specified method and identifying token.

UploadDataAsync(_Uri,TArray)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the POST method. This method does not block the calling thread.

UploadDataAsync(_Uri,_ByteArray)

Overloaded. Uploads a data buffer to a resource identified by a URI, using the POST method. This method does not block the calling thread.

UploadDataTaskAsync(String,String,TArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(String,String,_ByteArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(String,TArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(String,_ByteArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(_Uri,String,TArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(_Uri,String,_ByteArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(_Uri,TArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadDataTaskAsync(_Uri,_ByteArray)

Overloaded. Uploads a data buffer that contains a Byte array to the URI specified as an asynchronous operation using a task object.

UploadFile(String,String)

Overloaded. Uploads the specified local file to a resource with the specified URI.

UploadFile(String,String,String)

Overloaded. Uploads the specified local file to the specified resource, using the specified method.

UploadFile(_Uri,String)

Overloaded. Uploads the specified local file to a resource with the specified URI.

UploadFile(_Uri,String,String)

Overloaded. Uploads the specified local file to the specified resource, using the specified method.

UploadFileAsync(_Uri,String)

Overloaded. Uploads the specified local file to the specified resource, using the POST method. This method does not block the calling thread.

UploadFileAsync(_Uri,String,String)

Overloaded. Uploads the specified local file to the specified resource, using the POST method. This method does not block the calling thread.

UploadFileAsync(_Uri,String,String,Olevariant)

Overloaded. Uploads the specified local file to the specified resource, using the POST method. This method does not block the calling thread.

UploadFileTaskAsync(String,String)

Overloaded. Uploads the specified local file to a resource as an asynchronous operation using a task object.

UploadFileTaskAsync(String,String,String)

Overloaded. Uploads the specified local file to a resource as an asynchronous operation using a task object.

UploadFileTaskAsync(_Uri,String)

Overloaded. Uploads the specified local file to a resource as an asynchronous operation using a task object.

UploadFileTaskAsync(_Uri,String,String)

Overloaded. Uploads the specified local file to a resource as an asynchronous operation using a task object.

UploadString(String,String)

Overloaded. Uploads the specified string to the specified resource, using the POST method.

UploadString(String,String,String)

Overloaded. Uploads the specified string to the specified resource, using the specified method.

UploadString(_Uri,String)

Overloaded. Uploads the specified string to the specified resource, using the POST method.

UploadString(_Uri,String,String)

Overloaded. Uploads the specified string to the specified resource, using the specified method.

UploadStringAsync(_Uri,String)

Overloaded. Uploads the specified string to the specified resource. This method does not block the calling thread.

UploadStringAsync(_Uri,String,String)

Overloaded. Uploads the specified string to the specified resource. This method does not block the calling thread.

UploadStringAsync(_Uri,String,String,Olevariant)

Overloaded. Uploads the specified string to the specified resource. This method does not block the calling thread.

UploadStringTaskAsync(String,String)

Overloaded. Uploads the specified string to the specified resource as an asynchronous operation using a task object.

UploadStringTaskAsync(String,String,String)

Overloaded. Uploads the specified string to the specified resource as an asynchronous operation using a task object.

UploadStringTaskAsync(_Uri,String)

Overloaded. Uploads the specified string to the specified resource as an asynchronous operation using a task object.

UploadStringTaskAsync(_Uri,String,String)

Overloaded. Uploads the specified string to the specified resource as an asynchronous operation using a task object.

UploadValues(String,String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI, using the specified method.

UploadValues(String,String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI, using the specified method.

UploadValues(String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI.

UploadValues(String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI.

UploadValues(_Uri,String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI, using the specified method.

UploadValues(_Uri,String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI, using the specified method.

UploadValues(_Uri,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI.

UploadValues(_Uri,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI.

UploadValuesAsync(_Uri,String,TNameValueDictionary)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI, using the specified method. This method does not block the calling thread.

UploadValuesAsync(_Uri,String,TNameValueDictionary,Olevariant)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI, using the specified method. This method does not block the calling thread, and allows the caller to pass an object to the method that is invoked when the operation completes.

UploadValuesAsync(_Uri,String,_NameValueCollection)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI, using the specified method. This method does not block the calling thread.

UploadValuesAsync(_Uri,String,_NameValueCollection,Olevariant)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI, using the specified method. This method does not block the calling thread, and allows the caller to pass an object to the method that is invoked when the operation completes.

UploadValuesAsync(_Uri,TNameValueDictionary)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI. This method does not block the calling thread.

UploadValuesAsync(_Uri,_NameValueCollection)

Overloaded. Uploads the data in the specified name/value collection to the resource identified by the specified URI. This method does not block the calling thread.

UploadValuesTaskAsync(String,String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(String,String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(_Uri,String,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(_Uri,String,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(_Uri,TNameValueDictionary)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

UploadValuesTaskAsync(_Uri,_NameValueCollection)

Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object.

Top
Show:
 NameDescription
OnDownloadDataCompleted

Occurs when an asynchronous data download operation completes.

OnDownloadFileCompleted

Occurs when an asynchronous file download operation completes.

OnDownloadProgressChanged

Occurs when an asynchronous download operation successfully transfers some or all of the data.

OnDownloadStringCompleted

Occurs when an asynchronous resource-download operation completes.

OnOpenReadCompleted

Occurs when an asynchronous operation to open a stream containing a resource completes.

OnOpenWriteCompleted

Occurs when an asynchronous operation to open a stream to write data to a resource completes.

OnUploadDataCompleted

Occurs when an asynchronous data-upload operation completes.

OnUploadFileCompleted

Occurs when an asynchronous file-upload operation completes.

OnUploadProgressChanged

Occurs when an asynchronous upload operation successfully transfers some or all of the data.

OnUploadStringCompleted

Occurs when an asynchronous string-upload operation completes.

OnUploadValuesCompleted

Occurs when an asynchronous upload of a name/value collection completes.

OnWriteStreamClosed

Occurs when an asynchronous operation to write data to a resource using a write stream is closed. This API is now obsolete.

Top

See C:\Users\Public\Documents\CrystalNet Technologies\.Net VCL for Delphi Demo Folder after installation for examples of how to use this component.