9#ifndef MRPT_NET_UTILS_H
10#define MRPT_NET_UTILS_H
60 const string &auth_user =
string(),
61 const string &auth_pass =
string(),
62 int *out_http_responsecode = NULL,
88 const string &auth_user =
string(),
89 const string &auth_pass =
string(),
90 int *out_http_responsecode = NULL,
103 const std::string &server_name,
105 const unsigned int timeout_ms = 3000
std::vector< uint8_t > vector_byte
ERRORCODE_HTTP
Possible returns from a HTTP request.
bool BASE_IMPEXP 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...
std::string BASE_IMPEXP getLastSocketErrorStr()
Returns a description of the last Sockets error.
ERRORCODE_HTTP BASE_IMPEXP http_get(const string &url, vector_byte &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=NULL, mrpt::utils::TParameters< string > *extra_headers=NULL, mrpt::utils::TParameters< string > *out_headers=NULL, int timeout_ms=1000)
Perform an HTTP GET operation (version for retrieving the data as a vector_byte)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
For usage when passing a dynamic number of (numeric) arguments to a function, by name.