FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/include/expresscpp/response.hpp at master · tbeu/expresscpp · GitHub
tbeu
/
expresscpp
Public
forked from
expresscpp/expresscpp
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
response.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (30 loc) · 869 Bytes
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
response.hpp
Copy path
File metadata and controls
45 lines (30 loc) · 869 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
pragma
once
#
include
<
memory
>
#
include
<
string
>
#
include
<
string_view
>
#
include
"
boost/beast/http/message.hpp
"
#
include
"
boost/beast/http/string_body.hpp
"
#
include
"
boost/uuid/uuid.hpp
"
namespace
expresscpp
{
class
Session
;
class
Response
{
public:
explicit
Response
(Session* session);
void
SetStatus
(
const
uint16_t
status);
void
KeepAlive
(
bool
alive);
void
Send
(std::string message);
void
Send
();
void
Json
(std::string_view json_string);
bool
ResponseSent
()
const
;
public:
boost::beast::http::response<boost::beast::http::string_body> res{boost::beast::http::status::ok,
11
};
void
SendInternal
();
Session* session_{
nullptr
};
bool
response_sent_{
false
};
private:
uint16_t
status_{
200u
};
boost::uuids::uuid uuid_;
bool
costum_status_code_{
false
};
};
typedef
std::shared_ptr<Response>
response_t
;
}
//
namespace expresscpp
Back
|
FazBrowse Home
|
New Git URL