edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing
Click or drag to resize

HttpClient Class

Provides low-level access to HTTP file transfers. ExFTPConnection provides a superior interface and is recommended for general use.
Inheritance Hierarchy
SystemObject
  EnterpriseDT.Net.Ftp.HttpHttpClient

Namespace:  EnterpriseDT.Net.Ftp.Http
Assembly:  edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.3.0.0
Syntax
public class HttpClient : IExFileTransferClient, IFileTransferClient

The HttpClient type exposes the following members.

Constructors
  NameDescription
Public methodHttpClient
Initializes a new instance of the HttpClient class
Top
Properties
  NameDescription
Public propertyCloseStreamsAfterTransfer
If true then streams are closed after a transfer has completed.
Public propertyControlPort
The port on the server to which to connect to.
Public propertyCookies
Stores any cookies returned by the server
Public propertyCountBeforeSleep
Number of transfers before going to sleep
Public propertyDataEncoding
The encoding to use for data when transferring in ASCII mode.
Public propertyDeleteOnFailure
Controls whether or not a file is deleted when a failure occurs.
Public propertyDetectTransferMode
If set to true, the transfer mode in operations involving multiple files is automatically changed between ASCII and binary as appropriate.
Public propertyHttpMethod
HTTP method to use - GET is the default
Public propertyHttpParameters
Holds the HTTP parameters to be used for the next operation. These should be cleared if no parameters are to be used.
Public propertyIsConnected
Indicates whether the client is currently connected with the server.
Public propertyIsResuming
Returns true if the next transfer is to be resumed (i.e. Resume has been called).
Public propertyLastBytesTransferred
The number of bytes transferred in the last transfer operation.
Public propertyLastFileTransferred
The remote name/path of the last file transferred.
Public propertyLicenseKey
The license key string.
Public propertyLicenseOwner
The license owner string.
Public propertyMaxTransferRate
The maximum transfer rate in bytes per sec
Public propertyPassword
Password to user (if required)
Public propertyProxySettings
Settings for using proxies.
Public propertyRemoteHost
The domain-name or IP address of the HTTP server.
Public propertyServerValidation
Controls the way in which server certificates are validated.
Public propertyShowHiddenFiles
Include hidden files in operations that involve listing of directories, and if supported by the server. Not applicable for HTTP.
Public propertySleepEnabled
Enabling or not of sleeping after a certain number of transfers
Public propertySleepTime
Number of seconds spent asleep
Public propertyTimeout
Timeout on the requests in milliseconds.
Public propertyTransferBufferSize
The size of the buffers (in bytes) used in writing to and reading from the data-sockets.
Public propertyTransferNotifyInterval
The number of bytes transferred between each notification of the BytesTransferred event.
Public propertyTransferNotifyListings
By default the BytesTransferred event is not triggered during directory listings - this property can be used to enable this behaviour.
Public propertyTransferType
The current file transfer type (BINARY or ASCII).
Public propertyUserAgent
User agent for HTTP requests
Public propertyUserName
User name to use (if required)
Public propertyWelcomeMessage
Returns nothing since HTTP doesn't inherently support welcome messages.
Top
Methods
  NameDescription
Public methodCancelResume
Cancel the resume. Use this method if something goes wrong and the client is left in an inconsistent state
Public methodCancelTransfer
Cancels the current transfer.
Public methodCdUp
Change the remote working directory to the parent directory.
Public methodChDir
Change the remote working directory to that supplied.
Public methodConnect
Does nothing for this protocol.
Public methodDelete
Not supported by all HTTP servers
Public methodDir
List an HTML page's hrefs as an array of strings.
Public methodDir(String)
List an HTML page's hrefs as an array of strings.
Public methodDir(String, Boolean)
List an HTML page's hrefs as an array of strings.
Public methodDirDetails
List the current directory's hrefs as an array of FTPFile objects.
Public methodDirDetails(String)
List an HTML page's hrefs as an array of FTPFile objects.
Public methodDirDetails(String, FTPFileCallback)
Public methodDirDetails(String, Boolean)
Returns the given directory's contents and optionally that of its subdirectories as an array of FTPFile objects.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExists
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGet(String)
Get data from the FTP server.
Public methodGet(Stream, String)
Get data from the HTTP server.
Public methodGet(String, String)
Get data from the HTTP server.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLocalCRC
Get the CRC-32 checksum for the named local file
Public methodGetRemoteCRC
Get the CRC-32 checksum for the named remote file. Not supported in HTTP.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMkDir
Not supported by HTTP
Public methodModTime
Get modification time for a remote file.
Public methodMultipleDelete(FileFilter)
Delete multiple files in the current remote directory
Public methodMultipleDelete(String)
Delete multiple files in the current remote directory
Public methodMultipleDelete(String, FileFilter, Boolean)
Delete multiple files in the current remote directory and its subdirectories.
Public methodMultipleDelete(String, String, Boolean)
Delete multiple files in the current remote directory and its subdirectories.
Public methodMultipleDeleteDirectories
Remove a remote directory, and all its files and its subdirectories
Public methodMultipleGet(String, FileFilter)
Get multiple files into the specified local directory from the current remote directory
Public methodMultipleGet(String, String)
Get multiple files into the specified local directory from the current remote directory
Public methodMultipleGet(String, String, FileFilter, Boolean)
Get multiple files from the specified remote directory into the specified local directory
Public methodMultipleGet(String, String, String, Boolean)
Get multiple files from the specified remote directory into the specified local directory
Public methodMultiplePut(String, FileFilter)
Put multiple files from the specified local directory into the current remote directory
Public methodMultiplePut(String, String)
Put multiple files from the specified local directory into the current remote directory
Public methodMultiplePut(String, String, FileFilter, Boolean)
Put multiple files from the specified local directory into the specified remote directory
Public methodMultiplePut(String, String, String, Boolean)
Put multiple files from the specified local directory into the specified remote directory
Protected methodOnBytesTransferred
Protected methodOnTransferCompleteEx
Protected methodOnTransferStartedEx
Public methodPut(Byte, String)
Public methodPut(Stream, String)
Public methodPut(String, String)
Public methodPut(Byte, String, Boolean)
Public methodPut(Stream, String, Boolean)
Public methodPut(String, String, Boolean)
Public methodPwd
Get the current remote working directory.
Public methodQuit
Quit the HTTP session.
Public methodQuitImmediately
Quit the FTP session immediately by closing the control socket without sending the QUIT command.
Public methodRename
Not supported by HTTP
Public methodResume
Make the next file transfer resume.
Public methodResumeDownload
Make the next download resume at a specific point.
Public methodRmDir
Not supported by HTTP
Public methodSetModTime
Not supported by HTTP
Public methodSize
Get the size of a remote file.
Public methodTestConnection
Does nothing for HTTP protocol
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnlock
Unlock the software for use. This method should be used when a configuration file isn't available
Top
Events
  NameDescription
Public eventBytesTransferred
Event triggered every time TransferNotifyInterval bytes transferred.
Public eventParseHtmlLink
If set this event allows customized parsing of HTML links
Public eventTransferCompleteEx
Notifies of the completion of a transfer
Public eventTransferStartedEx
Notifies of the start of a transfer
Top
Fields
  NameDescription
Protected fieldconnected
Indicates whether Connect() has been called (or Quit()).
Protected fieldcurrentDirectory
Current directory
Protected fieldcurrentlyListing
A directory listing is being performed
Protected fieldkey
License key
Protected fieldlastBytesTransferred
Holds the number of bytes transferred in that most recent transfer.
Protected fieldlastFileTransferred
Name of the last file transferred.
Protected fieldmonitorInterval
Bytes transferred in between monitor callbacks
Protected fieldowner
License owner
Protected fieldsocks
SOCKS settings
Protected fieldthrottler
Threshold for throttling
Protected fieldtransferNotifyListings
Should BytesTransferred event be triggered in directory listings?
Protected fieldtransferType
Record of the transfer type - make the default BINARY for now
Top
See Also