-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpRequest.h
More file actions
33 lines (26 loc) · 791 Bytes
/
HttpRequest.h
File metadata and controls
33 lines (26 loc) · 791 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
//
// Created by hrkkk on 2024/2/3.
//
#ifndef WEBSERVER_HTTPREQUEST_H
#define WEBSERVER_HTTPREQUEST_H
#include <string>
#include <vector>
#include <unordered_map>
class HttpRequest {
public:
HttpRequest(): m_contentLength(0), m_cgi(false) {}
// HTTP请求内容
std::string m_requestLine; // 请求行
std::unordered_map<std::string, std::string> m_requestHeader; // 请求头
std::string m_blankLine; // 空行
std::string m_requestBody; // 请求正文
// 存放解析结果
std::string m_method;
std::string m_uri;
std::string m_version;
int m_contentLength;
std::string m_path;
std::string m_queryParam;
bool m_cgi;
};
#endif //WEBSERVER_HTTPREQUEST_H