Http response that will be sent to a client. More...
#include <HttpServer.h>
Public Member Functions | |
| Result | startResponse (int httpCode) |
| Starts the response with a http standard code (200 OK, 404 NOT FOUND etc.) | |
| Result | addHeader (StringSpan headerName, StringSpan headerValue) |
| Writes an http header to this response. | |
| Result | sendHeaders () |
| Start sending response headers, before sending any data. | |
| void | reset () |
| Resets this object for it to be re-usable. | |
| Result | end () |
| Finalizes the writable stream after sending all in progress writes. | |
| AsyncWritableStream & | getWritableStream () |
| Obtain writable stream to write content. | |
Friends | |
| struct | HttpServer |
| struct | HttpAsyncServer |
Http response that will be sent to a client.
| Result SC::HttpResponse::addHeader | ( | StringSpan | headerName, |
| StringSpan | headerValue ) |
Writes an http header to this response.
| Result SC::HttpResponse::end | ( | ) |
Finalizes the writable stream after sending all in progress writes.
|
inline |
Obtain writable stream to write content.
| void SC::HttpResponse::reset | ( | ) |
Resets this object for it to be re-usable.
| Result SC::HttpResponse::sendHeaders | ( | ) |
Start sending response headers, before sending any data.
| Result SC::HttpResponse::startResponse | ( | int | httpCode | ) |
Starts the response with a http standard code (200 OK, 404 NOT FOUND etc.)