2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
41#ifndef WEB_HTTP_STATUSCODES_H
42#define WEB_HTTP_STATUSCODES_H
44#ifndef DOXYGEN_SHOULD_SKIP_THIS
55 static std::string
reason(
int status);
std::shared_ptr< web::http::server::Request > requestBase
void download(const std::string &file, const std::string &fileName, const std::function< void(int)> &onError)
std::shared_ptr< web::http::server::Response > responseBase
Response & attachment(const std::string &fileName="")
Response & cookie(const std::string &name, const std::string &value, const std::map< std::string, std::string > &options={})
Response & clearCookie(const std::string &name, const std::map< std::string, std::string > &options={})
void sendFile(const std::string &file, const std::function< void(int)> &callback)
void redirect(const std::string &loc)
void download(const std::string &file, const std::function< void(int)> &onError)
Response & set(const std::string &field, const std::string &value, bool overwrite=true)
Response & setTrailer(const std::string &field, const std::string &value, bool overwrite=true)
Response & sendFragment(const std::string &chunk)
Response & sendFragment(const char *chunk, std::size_t chunkLen)
Response & append(const std::string &field, const std::string &value)
void send(const std::string &chunk)
Response(const std::shared_ptr< web::http::server::Response > &response) noexcept
void redirect(int state, const std::string &loc)
Response & status(int status)
void send(const char *chunk, std::size_t chunkLen)
Response & vary(const std::string &field)
Response & type(const std::string &type)
Response & set(const std::map< std::string, std::string > &headers, bool overwrite=true)
web::http::server::SocketContext * getSocketContext() const
const std::string & header(const std::string &field)
void json(const nlohmann::json &json)
void sendStatus(int state)
void upgrade(const std::shared_ptr< Request > &request, const std::function< void(const std::string)> &status)
Response & location(const std::string &loc)
static bool contains(int status)
static std::map< int, std::string > statusCode
static std::string reason(int status)
SocketContext * getSocketContext() const
Response & status(int statusCode)
void send(const std::string &chunk)
void send(const char *chunk, std::size_t chunkLen)
Response & setTrailer(const std::string &field, const std::string &value, bool overwrite=true)
Response & set(const std::map< std::string, std::string > &headers, bool overwrite=true)
Response & set(const std::string &field, const std::string &value, bool overwrite=true)
void upgrade(const std::shared_ptr< Request > &request, const std::function< void(const std::string &)> &status)
Response & type(const std::string &type)
Response & sendFragment(const std::string &chunk)
Response & cookie(const std::string &name, const std::string &value, const std::map< std::string, std::string > &options={})
Response & append(const std::string &field, const std::string &value)
Response & sendFragment(const char *chunk, std::size_t chunkLen)
void sendFile(const std::string &file, const std::function< void(int)> &callback)
Response & clearCookie(const std::string &name, const std::map< std::string, std::string > &options={})
const std::string & header(const std::string &field)