acl
3.5.3.0
http_type.hpp
浏览该文件的文档.
1
#pragma once
2
3
namespace
acl
{
4
5
struct
HTTP_PARAM
6
{
7
char
*
name
;
8
char
*
value
;
9
};
10
11
// HTTP 响应状态
12
typedef
enum
13
{
14
HTTP_OK
,
// 一切正常
15
HTTP_ERR_DNS
,
// 域名解析失败
16
HTTP_ERR_CONN
,
// 连接服务器失败
17
HTTP_ERR_REQ
,
// 创建请求协议失败
18
HTTP_ERR_READ
,
// 读数据失败
19
HTTP_ERR_SEND
,
// 写数据失败
20
HTTP_ERR_TIMO
,
// 读写数据超时
21
HTTP_ERR_READ_HDR
,
// 读 HTTP 响应头失败
22
HTTP_ERR_READ_BODY
,
// 读 HTTP 响应体失败
23
HTTP_ERR_INVALID_HDR
,
// HTTP 响应头无效
24
HTTP_ERR_UNKNOWN
,
// 出现了未知错误
25
HTTP_ERR_REDIRECT_MAX
,
// HTTP 响应头中重定向次数太多
26
}
http_status_t
;
27
28
// HTTP 请求方法
29
typedef
enum
30
{
31
HTTP_METHOD_UNKNOWN
,
// 未知方法
32
HTTP_METHOD_GET
,
// GET 方法
33
HTTP_METHOD_POST
,
// POST 方法
34
HTTP_METHOD_PUT
,
// PUT 方法
35
HTTP_METHOD_CONNECT
,
// CONNECT 方法
36
HTTP_METHOD_PURGE
,
// PURGE 方法
37
HTTP_METHOD_DELETE
,
// DELETE 方法
38
HTTP_METHOD_HEAD
,
// HEAD 方法
39
HTTP_METHOD_OPTION
,
// OPTION 方法
40
HTTP_METHOD_PROPFIND
,
// PROPFIND 方法
41
HTTP_METHOD_PATCH
,
// PATCH 方法
42
HTTP_METHOD_OTHER
,
// 其它的方法
43
}
http_method_t
;
44
45
typedef
enum
46
{
47
// Content-Type: application/x-www-form-urlencoded
48
HTTP_REQUEST_NORMAL
,
49
50
// Content-Type: multipart/form-data; boundary=xxx
51
HTTP_REQUEST_MULTIPART_FORM
,
52
53
// Content-Type: application/octet-stream
54
HTTP_REQUEST_OCTET_STREAM
,
55
56
// Content-Type: text/xml 或 application/xml
57
HTTP_REQUEST_TEXT_XML
,
58
59
// Content-Type: text/json 或 application/json
60
HTTP_REQUEST_TEXT_JSON
,
61
62
// 其它类型
63
HTTP_REQUEST_OTHER
64
}
http_request_t
;
65
66
typedef
enum
67
{
68
// ok
69
HTTP_REQ_OK
,
70
71
// network io error
72
HTTP_REQ_ERR_IO
,
73
74
// invalid request method
75
HTTP_REQ_ERR_METHOD
76
}
http_request_error_t
;
77
78
typedef
enum
79
{
80
HTTP_MIME_PARAM
,
// http mime 结点为参数类型
81
HTTP_MIME_FILE
// http mime 结点为文件类型
82
}
http_mime_t
;
83
84
}
// namespace acl end
acl::HTTP_REQUEST_OTHER
Definition:
http_type.hpp:63
acl::HTTP_REQUEST_TEXT_XML
Definition:
http_type.hpp:57
acl::HTTP_REQUEST_MULTIPART_FORM
Definition:
http_type.hpp:51
acl::HTTP_MIME_FILE
Definition:
http_type.hpp:81
acl::http_request_t
http_request_t
Definition:
http_type.hpp:45
acl::HTTP_REQ_ERR_METHOD
Definition:
http_type.hpp:75
acl::http_request_error_t
http_request_error_t
Definition:
http_type.hpp:66
acl::HTTP_METHOD_DELETE
Definition:
http_type.hpp:37
acl::HTTP_METHOD_PROPFIND
Definition:
http_type.hpp:40
acl::HTTP_REQ_ERR_IO
Definition:
http_type.hpp:72
acl::HTTP_ERR_READ
Definition:
http_type.hpp:18
acl::HTTP_ERR_INVALID_HDR
Definition:
http_type.hpp:23
acl::HTTP_ERR_REDIRECT_MAX
Definition:
http_type.hpp:25
acl::HTTP_PARAM::value
char * value
Definition:
http_type.hpp:8
acl::HTTP_ERR_SEND
Definition:
http_type.hpp:19
acl::http_mime_t
http_mime_t
Definition:
http_type.hpp:78
acl::HTTP_METHOD_CONNECT
Definition:
http_type.hpp:35
acl::HTTP_MIME_PARAM
Definition:
http_type.hpp:80
acl::HTTP_METHOD_PUT
Definition:
http_type.hpp:34
acl::HTTP_REQ_OK
Definition:
http_type.hpp:69
acl
Definition:
acl_cpp_init.hpp:4
acl::HTTP_ERR_READ_HDR
Definition:
http_type.hpp:21
acl::http_status_t
http_status_t
Definition:
http_type.hpp:12
acl::HTTP_ERR_UNKNOWN
Definition:
http_type.hpp:24
acl::HTTP_METHOD_PATCH
Definition:
http_type.hpp:41
acl::HTTP_METHOD_POST
Definition:
http_type.hpp:33
acl::HTTP_ERR_TIMO
Definition:
http_type.hpp:20
acl::HTTP_METHOD_PURGE
Definition:
http_type.hpp:36
acl::http_method_t
http_method_t
Definition:
http_type.hpp:29
acl::HTTP_ERR_READ_BODY
Definition:
http_type.hpp:22
acl::HTTP_ERR_REQ
Definition:
http_type.hpp:17
acl::HTTP_ERR_CONN
Definition:
http_type.hpp:16
acl::HTTP_PARAM::name
char * name
Definition:
http_type.hpp:7
acl::HTTP_METHOD_OPTION
Definition:
http_type.hpp:39
acl::HTTP_REQUEST_OCTET_STREAM
Definition:
http_type.hpp:54
acl::HTTP_REQUEST_NORMAL
Definition:
http_type.hpp:48
acl::HTTP_PARAM
Definition:
http_type.hpp:5
acl::HTTP_OK
Definition:
http_type.hpp:14
acl::HTTP_METHOD_UNKNOWN
Definition:
http_type.hpp:31
acl::HTTP_METHOD_OTHER
Definition:
http_type.hpp:42
acl::HTTP_REQUEST_TEXT_JSON
Definition:
http_type.hpp:60
acl::HTTP_METHOD_GET
Definition:
http_type.hpp:32
acl::HTTP_METHOD_HEAD
Definition:
http_type.hpp:38
acl::HTTP_ERR_DNS
Definition:
http_type.hpp:15
include
acl_cpp
http
http_type.hpp
生成于 2021年 九月 10日 星期五 11:14:44 , 为 acl使用
1.8.15