/

 

The manual

Self-training

Experimentation

Contact

 

Language

HTTP and FTP interface

The Storga HTTP, FTP, LPR, SMTP client

Send to a server

Send a file to a web server (HTTP or HTTPS), FTP server, mail server (SMTP) or a printer (LPR):

send_file f "http://my_web_site.my_domain.com/an_url" ""

or

send_file f "http://my_web_site.my_domain.com/an_url" "" error (var Str e)

Second example: printing a file:

send_file f "lpr://192.168.0.3/lp" ""

For information, the old syntax was:

var Str err := send_file f "http://my_web_site.my_domain.com/an_url" ""

From: Hubert Tonneau   2015-08-14 16:22:42

Préciser toutes les options utilisables au niveau du paramètre d'options après l'URL.

Receive from a server

Download a file from a web or FTP server.
For the web protocol, this is the GET instruction.

f := receive_file "http://my_web_site.my_domain.com/an_url" ""

or

f := receive_file "http://my_web_site.my_domain.com/an_url" "" error (var Str e)

For information, the old syntax was:

var Str err := receive_file "http://my_web_site.my_domain.com/an_url" "" f

Send and receive (convert, exchange, etc.)

This is the HTTP POST instruction, which supplies the server with one file, and receives another in return.

var File f2 := exchange_file f "http://my_web_site.my_domain.com/an_url" ""

or

var File f2 := exchange_file f "http://my_web_site.my_domain.com/an_url" "" error (var Str e)

For information, the old syntax was:

var Str err := exchange_file f "http://my_web_site.my_domain.com/an_url" "" (var File f2)