|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
RAII wrapper around an oveRTOS HTTP response. More...
#include <net_http.hpp>
Public Member Functions | |
| Response ()=default | |
| Constructs an empty response. | |
| ~Response () noexcept | |
| Destroys the response, freeing body and header buffers. | |
| Response (const Response &)=delete | |
| Response & | operator= (const Response &)=delete |
| Response (Response &&other) noexcept | |
| Move constructor – transfers ownership of response buffers. | |
| Response & | operator= (Response &&other) noexcept |
| Move-assignment operator – frees current buffers and takes ownership. | |
| int | status () const |
| Returns the HTTP status code (e.g. 200, 404). | |
| const char * | body () const |
| Returns the response body (NUL-terminated). | |
| size_t | body_len () const |
| Returns the response body length in bytes. | |
| const char * | headers () const |
| Returns the raw response headers. | |
| size_t | headers_len () const |
| Returns the response headers length in bytes. | |
| ove_http_response_t * | raw () |
| Returns a pointer to the underlying C response struct. | |
Public Attributes | |
| ove_http_response_t | raw_ {} |
RAII wrapper around an oveRTOS HTTP response.
Owns the body and header buffers returned by an HTTP request. Frees them automatically on destruction.
|
inlinenoexcept |
Move constructor – transfers ownership of response buffers.
| other | The source; its raw response is zeroed after the move. |
Move-assignment operator – frees current buffers and takes ownership.
| other | The source; its raw response is zeroed after the move. |
|
inline |
Returns a pointer to the underlying C response struct.
ove_http_response_t. | ove_http_response_t ove::http::Response::raw_ {} |
Underlying C response struct (populated by the client).