ESP32 HTTPS Server

Public Member Functions | Public Attributes | List of all members
httpsserver::HTTPResponse Class Reference

Represents the response stream of an HTTP request. More...

`#include <HTTPResponse.hpp>`

Inheritance diagram for httpsserver::HTTPResponse:
[legend]
Collaboration diagram for httpsserver::HTTPResponse:
[legend]

## 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)
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

## Detailed Description

Represents the response stream of an HTTP request.

## Member Function Documentation

## ◆ error()

void httpsserver::HTTPResponse::error | ( |  | ) |

This method can be called to cancel the ongoing transmission and send the error page (if possible)

## ◆ printStd()

void httpsserver::HTTPResponse::printStd | ( | std::string const & | str | ) |

Writes a string to the response. May be called several times.

## ◆ write() [1/2]

size_t httpsserver::HTTPResponse::write | ( | const uint8_t * | buffer,
|  | size_t | size
| ) |  |

Writes bytes to the response. May be called several times.

## ◆ write() [2/2]

size_t httpsserver::HTTPResponse::write | ( | uint8_t | b | ) |

Writes a single byte to the response.

The documentation for this class was generated from the following files:

- /home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPResponse.hpp
- /home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPResponse.cpp