
Smtp:/// - This will send in the HELO / EHLO command to the mail server at. Smtp:// - This connects to the mail server at and sends your local computer's host name in the HELO / EHLO command. However, this may not return the fully qualified domain name that is required by some mail servers and specifying this path allows you to set an alternative name, such as your machine's fully qualified domain name, which you might have obtained from an external function such as gethostname or getaddrinfo. If the path is omitted then libcurl will attempt to resolve the local computer's host name. The path part of a SMTP request specifies the host name to present during communication with the mail server. To retrieve files from the root directory or a directory underneath the root directory then the absolute path must be specified by prepending an additional forward slash to the beginning of the - This retrieves the readme.txt from the root directory when logging in as a specified user. When a username and password is specified, everything that is specified in the path part is relative to the user's home directory. This downloads readme.txt from the libcurl - This retrieves the readme.txt file from the user's home directory. This downloads the file readme.txt from the root directory. This retrieves the directory listing for our FTP server. If the directory is omitted then the directory listing for the root / home directory will be returned. If the file part is omitted then libcurl downloads the directory listing for the directory specified. The path part of an FTP request specifies the file to retrieve and from what directory. This returns the default document from the contactus directory. This returns the main page from Netscape by specifying the page to get. This gets the main page (index.html in this example) from Netscape's web server. The exact resource returned for each URL is entirely dependent on the server's configuration. If the file is omitted then the default document will be retrieved for either the directory specified or the root directory. If the directory is not specified then the web server's root directory is used. The path part of a HTTP request specifies the file to retrieve and from what directory. The path part of the URL is protocol specific and whilst some examples are given below this list is not conclusive: Smtp://:587/ - This will connect to a smtp server on the alternative mail port. This will connect to a web server using port 8080. The following examples show how to specify the port: It is also possible to specify the user name and password as part of the host, for some protocols, when connecting to servers that require authentication.įor example the following types of authentication support port is optional and when not specified libcurl will use the default port based on the determined or specified protocol: 80 for http, 21 for ftp and 25 for smtp, etc. This can be the fully qualified domain name of the server, the local network name of the machine on your network or the IP address of the server or machine represented by either an IPv4 or IPv6 address.

The host part of the URL contains the address of the server that you want to connect to. Use CURL.Protocols for detailed information on which protocols are supported. If the protocol is not supported, libcurl will return (CURLE_UNSUPPORTED_PROTOCOL) when you call CURL.Perform or CURL.PerformInBackground.


If the given URL lacks the scheme, or protocol, part (" or "ftp://" etc), libcurl will attempt to resolve which protocol to use based on the given host name. The parameter should be a text string which must be URL-encoded in the following format:įor a greater explanation of the format please see RFC 3986 (). If you want to include password and username, please use CURL.SetOptionUserName and CURL.SetOptionPassword instead of including them in the URL. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. $Encoding) /* Optional The text encoding for text parameter. MBS( "CURL.SetOptionURL" /* Sets the actual URL to deal with.
