SendHttpFile

Family: HTTP · One form

What it does

SendHttpFile sends File on a HTTP object. It takes connectionID (an integer), serverFile (a string), postData (a string) and localFile (a string), and answers an integer. connectionID is the id of a Connection object, obtained elsewhere in the HTTP family.

Syntax

SendHttpFile(connectionID integer, serverFile string, postData string, localFile string) → integer

Parameters

NameType
connectionIDinteger
serverFilestring
postDatastring
localFilestring

Every form returns

integer

Example · generated

connection = CreateHttpConnection()DO  Print(SendHttpFile(connection, "assets/data.dat", "value", "assets/data.dat"))  Sync()LOOP

CreateHttpConnection is there to give the call something to act on; SendHttpFile is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

21 commands in HTTP