|
FastLED 3.9.15
|
#include <server.h>
Collaboration diagram for fl::asio::http::Response:Public Member Functions | |
| Response () FL_NOEXCEPT | |
| Response & | body (const string &content) |
| Set response body. | |
| Response & | header (const string &name, const string &value) |
| Add HTTP header. | |
| Response & | json (const class json &data) |
| Set JSON response body with automatic Content-Type header. | |
| Response & | status (int code) |
| Set HTTP status code. | |
Static Public Member Functions | |
| static Response | bad_request (const string &message) |
| Factory method for 400 Bad Request response. | |
| static Response | internal_error (const string &message) |
| Factory method for 500 Internal Server Error response. | |
| static Response | not_found () |
| Factory method for 404 Not Found response. | |
| static Response | ok (const string &body="") |
| Factory method for 200 OK response. | |
Private Member Functions | |
| string | to_string () const |
Private Attributes | |
| string | mBody |
| map< string, string > | mHeaders |
| int | mStatusCode = 200 |
Friends | |
| class | Server |