GetHTTPFile
Description
Downloads an HTTP file from the server specified in SetHTTPHost and saves it to the location specified. Also allows you to send POST data to the server which can include variables or file data, e.g. "myvar=5&var2=test". This command returns immediately and continues the file download in the background. You can check on the progress of the download with GetHTTPFileProgress and GetHTTPFileComplete. The file will then be at the location you specified ready for use with AGK.
Definition
integer GetHTTPFile( iHTTP, szServerFile, szLocalFile, szPostData )
int agk::GetHTTPFile( uint32_t iHTTP, const char *szServerFile, const char *szLocalFile, const char *szPostData )
integer GetHTTPFile( iHTTP, szServerFile, szLocalFile )
int agk::GetHTTPFile( uint32_t iHTTP, const char *szServerFile, const char *szLocalFile )
Parameters
- iHTTP - The ID of the connection to use.
- szServerFile - The file to request from the server, include everything after the domain part of the URL.
- szLocalFile - The location to save to file, this will be inside the write folder for the current device.
- szPostData - The raw post data to send to the server, note that & and = are special characters that separate variables.