What it does
HttpFileGet reads File on a HTTP object. It takes connectionID (an integer), serverFile (a string) and localFile (a string), and answers an integer. That is the first of 2 forms. connectionID is the id of a Connection object, obtained elsewhere in the HTTP family.
Syntax
1
HttpFileGet(connectionID integer, serverFile string, localFile string) → integer2
HttpFileGet(connectionID integer, serverFile string, localFile string, postData string) → integerParameters
| Name | Type | In forms |
|---|---|---|
| connectionID | integer | all |
| serverFile | string | all |
| localFile | string | all |
| postData | string | 2 |
Every form returns
integer
Example · generated
Form 1, the short one
connection = CreateHttpConnection()DO Print(HttpFileGet(connection, "assets/data.dat", "assets/data.dat")) Sync()LOOPForm 2, with every argument
connection = CreateHttpConnection()DO Print(HttpFileGet(connection, "assets/data.dat", "assets/data.dat", "value")) Sync()LOOPCreateHttpConnection is there to give the call something to act on; HttpFileGet 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.