-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.h
More file actions
41 lines (29 loc) · 789 Bytes
/
Request.h
File metadata and controls
41 lines (29 loc) · 789 Bytes
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
/*++
Abstract:
Request class
Author:
Rinat Baygildin (bayrinat@gmail.com)
--*/
#ifndef HTTP_SERVER_REQUEST_H
#define HTTP_SERVER_REQUEST_H
namespace http {
namespace server {
struct SStartLine {
std::string method;
std::string uri;
std::string protocol;
};
class CRequest {
public:
bool EndRequest(const char* buffer, size_t size);
bool ParseStartLine();
const std::string& GetUri() const;
private:
static const std::string GET_METHOD;
static const std::string END_REQUEST;
std::string m_request;
SStartLine m_startline;
};
} // namespace server
} // namespace http
#endif //HTTP_SERVER_REQUEST_H