8#if THINGSBOARD_ENABLE_STL
40 virtual int connect(
char const * host, uint16_t port) = 0;
53 virtual int post(
char const * url_path,
char const * content_type,
char const * request_body) = 0;
65 virtual int get(
const char *url_path) = 0;
71#if THINGSBOARD_ENABLE_STL
HTTP Client interface that contains the method that a class that can be used to send and receive data...
Definition: IHTTP_Client.h:22
virtual int post(char const *url_path, char const *content_type, char const *request_body)=0
Connects to the server and sends a POST request with a body and content type.
virtual void stop()=0
Disconnects the given device from the current host and clears about any remaining bytes still in the ...
virtual int get(const char *url_path)=0
Connects to the server and sends a GET request.
virtual std::string get_response_body()=0
Returns the response body of a previously sent message as a string object, skips any response headers...
virtual void set_keep_alive(bool keep_alive)=0
Sets whether to close the HTTP connection for every single request and reconnect once a new request i...
virtual ~IHTTP_Client()
Virtual default destructor, created to ensure that if a pointer to this class is used and deleted,...
Definition: IHTTP_Client.h:25
virtual int connect(char const *host, uint16_t port)=0
Connects to the given server instance over the defined port.
virtual int get_response_status_code()=0
Gets the HTTP status code contained in the server response.