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:

FTP Functionality

The IDLnetURL object enables the following FTP-related tasks:

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:

URL_SCHEME://URL_USERNAME:URL_PASSWORD@URL_HOST:URL_PORT/URL_PATH?
URL_QUERY 

For example:

http://me:mypw@host.com:8080/project/data/get_data.cgi?dataset=cli
mate&date=01012006 

Table 33-36: IDLnetURL object URL properties.

IDLnetURL Property
Value

URL_SCHEME

`http' (the default), `https', `ftp', or `ftps'

(The string "://" is appended to URL_SCHEME)

URL_USERNAME

Any string.

The character ":" is appended if URL_PASSWORD is supplied; otherwise the character "@" is appended.

The null string is the default.

URL_PASSWORD

Any string.

The character "@" is appended.

The null string is the default.

URL_HOST

my.hostname.com

The null string is the default.

URL_PORT

8080

The default is 80.

The ":" character is prepended to URL_PORT if it is not null.

URL_PATH

demo/index.html

The null string is the default.

The '/' character is prepended to URL_PATH if it is not null.

URL_QUERY

Parm1=value1&Parm2=value2& (and so on).

The null string is the default.

The '?' character is prepended to URL_QUERY if it is not null.