Creates a new FTP upload request object
The URL to which the body will be uploaded
|body||String or blob||
The data to upload
An httprequest object
This method returns an httprequest object primed to make an FTP PUT request. The request isn’t issued until either httprequest.sendsync() or httprequest.sendasync() is called on the returned httprequest object.
The contents of the body parameters will be uploaded and stored with the name specified in the URL.
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.
See either of the ‘send’ methods listed above for information on status code values indicating success or failure (eg. login denied).
The following agent code snippet uses ftp.put() to set up a request to post data converted to a CSV spreadsheet file to an FTP server.