Creates a new FTP download request object
The URL from which to retrieve the file or directory listing
An httprequest object
Warning FTP functionality has been deprecated and will shortly be removed. You should not make use of the ftp object and its methods in new applications, and existing applications should be updated to use an alternative file-transfer mechanism, such as HTTP.
This method returns an httprequest object primed to make an FTP GET request. The request isn’t issued until either httprequest.sendsync() or httprequest.sendasync() is called on the returned httprequest object.
The URL may be in any form suitable for FTP, such as
"ftp://host:port/path" for anonymous retrieval or
"ftp://user:password@host:port/path" where a username and password are required. The URL must start with
"ftp:" — ie. it must include the colon. FTPS is not supported.
The response object (returned directly from httprequest.sendsync() or passed into a callback function registered with httprequest.sendasync()) will contain the request status code and, if successful, the required file or directory listing as its body. See either of the ‘send’ methods listed above for information on status code values indicating success or failure (eg. login denied).
Note For a successful transfer, the status code provided in the response will be 226 — see Wikipedia’s ist of FTP return codes.