61 const string&
url, std::vector<uint8_t>& out_content,
string& out_errormsg,
62 int port = 80,
const string& auth_user =
string(),
63 const string& auth_pass =
string(),
int* out_http_responsecode =
nullptr,
66 int timeout_ms = 1000);
88 const string&
url,
string& out_content,
string& out_errormsg,
int port = 80,
89 const string& auth_user =
string(),
const string& auth_pass =
string(),
90 int* out_http_responsecode =
nullptr,
93 int timeout_ms = 1000);
97 const string& http_method,
const string& http_send_content,
98 const string&
url, std::vector<uint8_t>& out_content,
string& out_errormsg,
99 int port = 80,
const string& auth_user =
string(),
100 const string& auth_pass =
string(),
int* out_http_responsecode =
nullptr,
103 int timeout_ms = 1000);
113 const std::string& server_name, std::string& out_ip,
114 const unsigned int timeout_ms = 3000);
134 const std::string& address,
const int max_attempts,
135 std::string* output_str =
nullptr);
std::string getLastSocketErrorStr()
Returns a description of the last Sockets error.
ERRORCODE_HTTP http_get(const string &url, std::vector< uint8_t > &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=nullptr, mrpt::system::TParameters< string > *extra_headers=nullptr, mrpt::system::TParameters< string > *out_headers=nullptr, int timeout_ms=1000)
Perform an HTTP GET operation (version for retrieving the data as a std::vector<uint8_t>) ...
bool Ping(const std::string &address, const int max_attempts, std::string *output_str=nullptr)
Ping an IP address.
ERRORCODE_HTTP
Possible returns from a HTTP request.
bool DNS_resolve_async(const std::string &server_name, std::string &out_ip, const unsigned int timeout_ms=3000)
Resolve a server address by its name, returning its IP address as a string - This method has a timeou...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
ERRORCODE_HTTP http_request(const string &http_method, const string &http_send_content, const string &url, std::vector< uint8_t > &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=nullptr, mrpt::system::TParameters< string > *extra_headers=nullptr, mrpt::system::TParameters< string > *out_headers=nullptr, int timeout_ms=1000)
Generic function for HTTP GET & POST methods.
For usage when passing a dynamic number of (numeric) arguments to a function, by name.