|
BOOLEAN | http.getfile (STRING url, STRING path) |
| Download the specified file. More...
|
|
NIL | http.getfile (STRING url, STRING path, NUMBER over) |
| Download the specified file (in thread mode). More...
|
|
BOOLEAN | http.postfile (STRING url, STRING path, STRING data_out) |
| Send data file indicated a Web address and then download the server response. More...
|
|
BOOLEAN | http.postfile (STRING url, STRING path, STRING data_out, NUMBER data_len) |
| Send data file indicated a Web address and then download the server response. More...
|
|
Functions related to Hypertext Transfer Protocol. All actions performed by these functions include an automatic integrated manager cookies.
BOOLEAN http.getfile |
( |
STRING |
url, |
|
|
STRING |
path |
|
) |
| |
Download the specified file.
- Parameters
-
url | The address of the file to download. |
path | The path where the file is saved (you must include the file name). |
- Returns
- true if the file was downloaded successfully, false otherwise.
- Note
- This function can use the onNetGetFile() callback, more info here .
NIL http.getfile |
( |
STRING |
url, |
|
|
STRING |
path, |
|
|
NUMBER |
over |
|
) |
| |
Download the specified file (in thread mode).
- Parameters
-
url | The address of the file to download. |
path | The path where the file is saved (you must include the file name). |
over | The numerical value: 1, to enter in thread mode. This is a list of all of the available constants and their values:
- __NET_THREAD_STATE
- Status of the download.
- 0: No download or is starting.
- 1: Download completed successfully.
- 2: Download in progress.
- -1: Occurred an error in the download.
- __NET_THREAD_SIZE
- The number of bytes to receive the download.
- __NET_THREAD_WRITTEN
- The number of bytes written from the discharge.
- __NET_THREAD_VELOCITY
|
- Note
- This function does not stop the script, or affects the performance, runs independently, for greater use, refer to the examples Examples of use of OneLua.
- Returns
- Nothing.
BOOLEAN http.postfile |
( |
STRING |
url, |
|
|
STRING |
path, |
|
|
STRING |
data_out |
|
) |
| |
Send data file indicated a Web address and then download the server response.
- Parameters
-
url | The Web address file receiver. |
path | The path where the file is saved (you must include the file name). |
data_out | The information that will be sent to the Web server. |
- Returns
- true if the file was downloaded successfully, false otherwise.
- Note
- This function can use the onNetGetFile() callback, more info here .
BOOLEAN http.postfile |
( |
STRING |
url, |
|
|
STRING |
path, |
|
|
STRING |
data_out, |
|
|
NUMBER |
data_len |
|
) |
| |
Send data file indicated a Web address and then download the server response.
- Parameters
-
url | The Web address file receiver. |
path | The path where the file is saved (you must include the file name). |
data_out | The information that will be sent to the Web server. |
data_len | The size of the information that will be sent to the Web server. |
- Returns
- true if the file was downloaded successfully, false otherwise.
- Note
- This function can use the onNetGetFile() callback, more info here .