Electroneum
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
crow::response Struct Reference

#include <http_response.h>

Collaboration diagram for crow::response:
Collaboration graph
[legend]

Public Member Functions

void set_header (std::string key, std::string value)
 
void add_header (std::string key, std::string value)
 
const std::string & get_header_value (const std::string &key)
 
 response ()
 
 response (int code)
 
 response (std::string body)
 
 response (json::wvalue &&json_value)
 
 response (int code, std::string body)
 
 response (const json::wvalue &json_value)
 
 response (int code, const json::wvalue &json_value)
 
 response (response &&r)
 
responseoperator= (const response &r)=delete
 
responseoperator= (response &&r) noexcept
 
bool is_completed () const noexcept
 
void clear ()
 
void write (const std::string &body_part)
 
void end ()
 
void end (const std::string &body_part)
 
bool is_alive ()
 

Public Attributes

int code {200}
 
std::string body
 
json::wvalue json_value
 
ci_map headers
 

Private Member Functions

void json_mode ()
 

Private Attributes

bool completed_ {}
 
std::function< void()> complete_request_handler_
 
std::function< bool()> is_alive_helper_
 

Friends

template<typename Adaptor , typename Handler , typename ... Middlewares>
class crow::Connection
 

Constructor & Destructor Documentation

◆ response() [1/8]

crow::response::response ( )
inline

◆ response() [2/8]

crow::response::response ( int  code)
inlineexplicit

◆ response() [3/8]

crow::response::response ( std::string  body)
inline

◆ response() [4/8]

crow::response::response ( json::wvalue &&  json_value)
inline

◆ response() [5/8]

crow::response::response ( int  code,
std::string  body 
)
inline

◆ response() [6/8]

crow::response::response ( const json::wvalue json_value)
inline

◆ response() [7/8]

crow::response::response ( int  code,
const json::wvalue json_value 
)
inline

◆ response() [8/8]

crow::response::response ( response &&  r)
inline

Member Function Documentation

◆ add_header()

void crow::response::add_header ( std::string  key,
std::string  value 
)
inline

◆ clear()

void crow::response::clear ( )
inline

◆ end() [1/2]

void crow::response::end ( )
inline

◆ end() [2/2]

void crow::response::end ( const std::string &  body_part)
inline

◆ get_header_value()

const std::string& crow::response::get_header_value ( const std::string &  key)
inline

◆ is_alive()

bool crow::response::is_alive ( )
inline

◆ is_completed()

bool crow::response::is_completed ( ) const
inlinenoexcept

◆ json_mode()

void crow::response::json_mode ( )
inlineprivate

◆ operator=() [1/2]

response& crow::response::operator= ( const response r)
delete

◆ operator=() [2/2]

response& crow::response::operator= ( response &&  r)
inlinenoexcept

◆ set_header()

void crow::response::set_header ( std::string  key,
std::string  value 
)
inline

◆ write()

void crow::response::write ( const std::string &  body_part)
inline

Friends And Related Function Documentation

◆ crow::Connection

template<typename Adaptor , typename Handler , typename ... Middlewares>
friend class crow::Connection
friend

Member Data Documentation

◆ body

std::string crow::response::body

◆ code

int crow::response::code {200}

◆ complete_request_handler_

std::function<void()> crow::response::complete_request_handler_
private

◆ completed_

bool crow::response::completed_ {}
private

◆ headers

ci_map crow::response::headers

◆ is_alive_helper_

std::function<bool()> crow::response::is_alive_helper_
private

◆ json_value

json::wvalue crow::response::json_value

The documentation for this struct was generated from the following file: