Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).


Understanding HTTP and HTTPS file transfers

Automating HTTP(S) file transfers can be more complicated than using the other file transfer protocols supported by Robo-FTP, such as FTP, FTPS, and SFTP. This article describes the two commonly encountered types of HTTP file transfers and provides tips for how to automate them using Robo-FTP.

HTTP file transfer server

This first type of file transfer is the simpler of the two. In this case, the server is set up as a file transfer server and operates more or less the same as if it were an FTP or SFTP file transfer server. The process might look something like this, using Robo-FTP:

  • Connect to server using FTPLOGON
  • Use SENDFILE to upload a file
  • Use RCVFILE to download a file
  • Use FTPLOGOFF to disconnect

HTTP web server displaying web forms

This scenario is more complicated. In this case, you are dealing with a web server, not a file transfer server. Both use HTTP to communicate between the client and server, but the nature of that communication is very different. In this case, the client is typically a web browser, and the interaction might look something like this:

  • Upon connecting to the server (usually by entering an address in the web browser), the server sends down a web page (usually HTML) to be displayed by the browser. This page is usually a web form (most often, a login form).
  • User enters credentials into the web form and clicks a submit button, causing the browser to post the information entered into the form to the web server.
  • Assuming the server is able to validate your credentials, the web server sends down another HTML web page, perhaps with an upload web form and an HTML-formatted directory listing of files you could download.
  • This process continues throughout the session, with the web server sending HTML-formatted web pages for the browser to display, and the user posting back information via web forms.

It is possible to use Robo-FTP to automate these types of sessions, but it is more complicated because you must write a script that simulates what would otherwise be done using a web browser.

This sample script demonstrates how to simulate using a web upload form to post a file to a web server:

http://kb.robo-ftp.com/script_library/show/26

This sample script demonstrates how to parse an HTML-formatted directory listing sent by the server to determine what files are available for download:

http://kb.robo-ftp.com/script_library/show/59

Robo-FTP Professional Services are available to perform this kind of scripting for you at an hourly rate. If you are interested in this service, please contact Sales here: Contact Sales.

Article last updated: 2022-01-13

Tags: HTTP, HTTPS, POST, Web