ESP32 HTTPS Server
|
Represents the response stream of an HTTP request. More...
#include <HTTPResponse.hpp>
Public Member Functions | |
HTTPResponse (ConnectionContext *con) | |
void | setStatusCode (uint16_t statusCode) |
void | setStatusText (std::string const &statusText) |
uint16_t | getStatusCode () |
std::string | getStatusText () |
void | setHeader (std::string const &name, std::string const &value) |
std::string | getHeader (std::string const &name) |
bool | isHeaderWritten () |
void | printStd (std::string const &str) |
size_t | write (const uint8_t *buffer, size_t size) |
size_t | write (uint8_t) |
void | error () |
bool | isResponseBuffered () |
void | finalize () |
Public Attributes | |
ConnectionContext * | _con |
Represents the response stream of an HTTP request.
void httpsserver::HTTPResponse::error | ( | ) |
This method can be called to cancel the ongoing transmission and send the error page (if possible)
void httpsserver::HTTPResponse::printStd | ( | std::string const & | str | ) |
Writes a string to the response. May be called several times.
size_t httpsserver::HTTPResponse::write | ( | const uint8_t * | buffer, |
size_t | size | ||
) |
Writes bytes to the response. May be called several times.
size_t httpsserver::HTTPResponse::write | ( | uint8_t | b | ) |
Writes a single byte to the response.