fastdo
0.6.16
首页
命名空间
类
文件
文件列表
文件成员
http_Cookie.hpp
浏览该文件的文档.
1
#ifndef __HTTP_COOKIE_HPP__
2
#define __HTTP_COOKIE_HPP__
3
4
namespace
http
5
{
6
8
class
HTTPWRAPPER_DLL
Cookie
9
{
10
class
HTTPWRAPPER_DLL
ExpiresVal
11
{
12
public
:
13
bool
empty()
const
{
return
_vStr.empty(); }
14
operator
winux::String
& () {
return
_vStr; }
15
operator
winux::String
const
& ()
const
{
return
_vStr; }
16
17
void
operator = (
winux::int64
v );
18
winux::String
& operator = (
winux::String
const
& v ) {
return
_vStr = v; }
19
private
:
20
winux::String
_vStr;
21
};
22
public
:
23
Cookie
() : secure(false), httpOnly(false), wantSet(false) { }
24
Cookie
(
25
winux::String
name,
26
winux::String
value =
""
,
27
winux::int64
expires = -1,
28
winux::String
domain =
""
,
29
winux::String
path =
""
,
30
bool
secure =
false
,
31
bool
httpOnly =
false
32
);
33
34
operator
winux::String
const
& ()
const
{
return
this->value; }
35
36
// 设置值时将wantSet标志设真
37
winux::String
& operator = (
winux::String
const
& v );
38
// 获得一个用于Set-Cookie的字符串,不包含"Set-Cookie:"串
39
winux::String
toSetString()
const
;
40
41
winux::String
name
;
42
winux::String
value
;
43
ExpiresVal
expires
;
44
winux::String
domain
;
45
winux::String
path
;
46
bool
secure
;
47
bool
httpOnly
;
48
49
bool
wantSet
;
// 该Cookie是否要设置
50
};
51
52
inline
std::ostream &
operator <<
( std::ostream & o,
Cookie
const
& cookie )
53
{
54
o << (
winux::String
)cookie;
55
return
o;
56
}
57
58
}
// namespace http
59
60
61
#endif // __HTTP_COOKIE_HPP__
winux::int64
__int64 int64
Definition:
utilities.hpp:232
http::Cookie::expires
ExpiresVal expires
Definition:
http_Cookie.hpp:43
http::Cookie::value
winux::String value
Definition:
http_Cookie.hpp:42
HTTPWRAPPER_DLL
#define HTTPWRAPPER_DLL
Definition:
http_base.hpp:24
winux::String
XString< tchar > String
Definition:
utilities.hpp:261
http::operator<<
std::ostream & operator<<(std::ostream &o, Cookie const &cookie)
Definition:
http_Cookie.hpp:52
http::Cookie::Cookie
Cookie()
Definition:
http_Cookie.hpp:23
http::Cookie::httpOnly
bool httpOnly
Definition:
http_Cookie.hpp:47
http
HTTP协议的相关简单类封装
Definition:
http_base.hpp:32
http::Cookie::name
winux::String name
Definition:
http_Cookie.hpp:41
http::Cookie::domain
winux::String domain
Definition:
http_Cookie.hpp:44
http::Cookie::secure
bool secure
Definition:
http_Cookie.hpp:46
http::Cookie::wantSet
bool wantSet
Definition:
http_Cookie.hpp:49
http::Cookie
封装了Cookie的http协议细节
Definition:
http_Cookie.hpp:8
http::Cookie::path
winux::String path
Definition:
http_Cookie.hpp:45
dist
x64
include
http_Cookie.hpp
生成于 2024年 十二月 24日 星期二 01:35:06 , 为 fastdo使用
1.8.11