-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathcommon.h
More file actions
57 lines (51 loc) · 898 Bytes
/
common.h
File metadata and controls
57 lines (51 loc) · 898 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// Created by Alone on 2022-7-23.
//
#ifndef MYUTIL_COMMON_H
#define MYUTIL_COMMON_H
namespace http
{
enum PARSER_REQUEST_STATE
{
REQUEST_LINE,
REQUEST_HEAD,
REQUEST_BODY,
REQUEST_END
};
enum PARSER_RESPONSE_STATE
{
RESPONSE_LINE,
RESPONSE_HEAD,
RESPONSE_BODY,
RESPONSE_END
};
enum METHOD
{
GET = 1,
POST
};
enum VERSION
{
VERSION1_1
};
enum STATUS_CODE
{
Continue = 100,
Switching = 101,
OK = 200,
Created = 201,
NotFound = 404,
RequestTimeout = 408,
InternalError = 500,
GatewayTimeout = 504,
NotSupportedVersion = 505
};
enum ACCEPT_CONTENT_TYPE
{
T_JSON,
T_POST_URL,
T_POST_FROM_DATA,
T_ANY
};
}
#endif //MYUTIL_COMMON_H