OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::DownloadFile Namespace Reference

Functions

OT_COMMUNICATION_API_EXPORT bool download (const std::string &_fileUrl, const std::string &_fileName, std::string &_tempFolder, std::string &_error, int _timeout=3000)
 Download a file via HTTP from a server.
 

Function Documentation

◆ download()

bool ot::DownloadFile::download ( const std::string & _fileUrl,
const std::string & _fileName,
std::string & _tempFolder,
std::string & _error,
int _timeout = 3000 )

Download a file via HTTP from a server.

Parameters
_fileUrlThe URL of the file to be downloaded
_fileNameName of the file where the data will be stored
_tempFolderReturn parameter containing the name of the temporary directory where the file is stored
_errorReturn parameter containing an error description in case that an error occurred (return value = false)
_timeoutThe timeout for contacting the server