Overview of the IDLnetURL Object
The following sections give a general overview of the IDLnetURL object's capabilities.
HTTP Functionality
The IDLnetURL object enables the following HTTP-related tasks:
- Allows IDL to act as a HTTP client node.
- Allows IDL to act as a HTTP SSL client node.
- Issues Get requests to retrieve data from a remote HTTP server and place it in a buffer or file.
- Issues Put requests to move data from a buffer or file to a remote HTTP server.
- Issues Post requests to move data from a buffer or file to a remote HTTP server.
- Encrypts all data to and from a remote HTTP server with SSL.
- Compresses and decompresses data to and from a remote HTTP server.
- Supports Basic and Digest authentication modes.
- Supports customizing HTTP headers that are later sent to the remote HTTP server.
- Returns the HTTP response code and HTTP response header to the user.
- Provides status callbacks so the user can monitor call progress.
- Requests can be cancelled if the user chooses not to wait for a complete reply.
FTP Functionality
The IDLnetURL object enables the following FTP-related tasks:
- Allows IDL to act as a FTP client node.
- Allows IDL to act as a FTP SSL client node.
- Issues Get requests to retrieve data from a remote FTP server to a buffer or file.
- Issues Put requests to move data from a buffer or file to a remote FTP server.
- Issues Dir requests to retrieve directory listings from a remote FTP server.
- Issues commands (Delete, Make dir, and so on) to a remote FTP server.
- Encrypts all data to and from a remote FTP server with SSL.
- Supports authentication (logging into a remote FTP server).
- Returns the FTP response code and FTP response replies to the user.
- Provides status callbacks so the user can monitor call progress.
- Requests can be cancelled if the user chooses not to wait for a complete reply.
- Supports custom commands that are sent to the remote FTP server.
- Supports both Active and Passive mode connections.
HTTP Authentication Modes
The IDLnetURL object supports Disabled, Basic, and Digest HTTP authentication modes. It also supports authenticating with a remote HTTP or FTP server, and with proxy servers. The username and password can be set for both a remote HTTP or FTP server, and for a proxy server.
FTP Authentication
The IDLnetURL object supports logging in to a remote FTP server. A username and password can be set prior to connecting to a remote FTP server.
Secure HTTP
The IDLnetURL object supports the HTTPS protocol by implementing a secure socket layer (SSL). Secure HTTP ensures that all requests and responses are encrypted. To activate SSL, set the URL_SCHEME property to `https'.
Secure FTP
The IDLnetURL object supports implicit and explicit SSL, which ensure that all requests and responses are encrypted. An FTP server may support implicit SSL, explicit SSL, or both.
Warning
Different FTP servers provide different responses when SSL authentication is not available. IDL attempts to catch these responses and generate errors if the FTP server does not support SSL, but there may be cases when IDL makes a non-SSL connection even when an SSL connection is requested. If you are not sure that the FTP server you are connecting to supports SSL, view the complete response headers to check that the connection is being made using SSL.
Explicit SSL is activated by setting the FTP_EXPLICIT_SSL keyword in the Get, Put, GetFtpDirList, and FtpCommand methods. Implicit SSL is activated by setting the scheme to `ftps'.
Note
Implicit SSL has been deprecated.
SSL Protocol Versions
By default, the IDLnetURL object supports automatic determination of the SSL protocol that is supported by the remote HTTP or FTP server. If the remote server does not support automatic determination of the SSL protocol version, you can direct the object to use a specific version with the SSL_VERSION property. The IDLnetURL object supports protocol versions TLS v1, SSL v2, and SSL v3. TLS v1 supersedes all previous versions of the SSL protocols.
HTTP Encoding
The IDLnetURL object supports compressed/encoded responses from a remote HTTP server, as well as the deflate and GZIP encoding formats. Refer to the description of the ENCODE property for details.
Proxies
The IDLnetURL object supports proxies. When the object utilizes a proxy, the PROXY_HOSTNAME and PROXY_PORT properties must be set.
Connection Caching
The IDLnetURL object caches up to five existing connections to remote HTTP or FTP servers. Once a connection is established to a remote server, the connection is reused on subsequent transactions with the remote server. Reusing a connection can save time because the connect, login, and SSL handshake information does not need to be repeated.
Use the IDLnetURL::CloseConnections method to close a connection. Typically, a remote server closes an existing connection after a period of no activity. When this occurs, the closed connection is removed from the existing connections list. Closing a connection using the CloseConnections method is useful for changing login information, enabling or disabling SSL, starting a new set of transactions on the FTP or HTTP server, and so on for the next transaction with the server.
Mapping URL Components to IDLnetURL Properties
Table 33-36 shows how the components of a URL map to IDLnetURL properties. Set these properties by calling the SetProperty method.
Note
You can use the PARSE_URL function to break up a URL into its component strings, which can then be passed to IDLnetURL::SetProperty method.
A URL has the following composition:
For example: