Loading...
Searching...
No Matches
NAF::HTTP::CommonResponses Class Reference
Inheritance diagram for NAF::HTTP::CommonResponses:
NAF::HTTP::Request NAF::Functions::Function NAF::Handlers::RootHandler Frontend Frontend NAF::Handlers::BackendHandler NAF::Handlers::CustomHandler NAF::Handlers::LoginHandler NAF::Handlers::NullHandler NAF::Handlers::WebSocketHandler MainHandler MainHandler MainHandler MainHandler

Classes

struct  Attributes
 

Public Member Functions

std::map< HTTP::Status, Attributes > & get_responses_ ()
 
void CompoundResponse_ (HTTP::Status status, JSON::Object::Ptr result_json)
 
void CompoundFillResponse_ (HTTP::Status status, JSON::Object::Ptr result_json, std::string message)
 
void JSONResponse_ (HTTP::Status status, std::string message)
 
void HTMLResponse_ (HTTP::Status status, std::string message)
 
void CustomHTMLResponse_ (HTTP::Status status, std::string html_message)
 
void FileResponse_ (HTTP::Status status, std::string address)
 
void FileResponse_ (HTTP::Status status, std::string address, Files::FileManager &file_manager)
 
- Public Member Functions inherited from NAF::HTTP::Request
HTTPServerRequestPtr & get_http_server_request ()
 
HTTPServerResponsePtr & get_http_server_response ()
 
std::vector< HTTP::Headerget_headers ()
 
std::vector< HTTP::Cookieget_cookies ()
 
void AddHeader_ (std::string name, std::string value)
 
void AddHeader_ (HTTP::Header header)
 
void AddCookie_ (std::string name, std::string value)
 
void AddCookie_ (HTTP::Cookie cookie)
 

Protected Member Functions

void FillResponses_ ()
 
void FillStatusMessage_ (JSON::Object::Ptr json_object, HTTP::Status status, std::string message)
 
- Protected Member Functions inherited from NAF::HTTP::Request
void SetupRequest_ (Net::HTTPServerRequest &request)
 
void SetupResponse_ (Net::HTTPServerResponse &response)
 
void SetupHeaders_ ()
 
void SetupCookies_ ()
 

Additional Inherited Members

- Public Types inherited from NAF::HTTP::Request
using HTTPServerRequestPtr = std::optional<HTTPServerRequest*>
 
using HTTPServerResponsePtr = std::optional<HTTPServerResponse*>