fastdo
0.6.16
首页
命名空间
类
文件
文件列表
文件成员
http_Cookies.hpp
浏览该文件的文档.
1
#ifndef __HTTP_COOKIES_HPP__
2
#define __HTTP_COOKIES_HPP__
3
4
namespace
http
5
{
6
8
class
HTTPWRAPPER_DLL
Cookies
9
{
10
public
:
11
Cookies
() { }
12
16
void
set
(
17
winux::String
name,
18
winux::String
value =
""
,
19
winux::int64
expires = -1,
20
winux::String
domain =
""
,
21
winux::String
path =
""
,
22
bool
secure =
false
,
23
bool
httpOnly = false
24
);
25
26
http::Cookie
const
&
get
(
winux::String
const
& name )
const
{
return
_cookies.at(name); }
27
29
void
clear
() { _cookies.clear(); }
30
32
void
loadCookies(
winux::AnsiString
const
& cookiesStr );
33
35
void
commitTo(
http::Header
* header );
36
40
winux::Mixed
dump()
const
;
41
45
bool
has
(
winux::String
const
& name )
const
{
return
_cookies.find(name) != _cookies.end(); }
46
52
http::Cookie
& operator [] (
winux::String
const
& name );
53
55
http::Cookie
const
& operator [] (
winux::String
const
& name )
const
{
return
_cookies.at(name); }
56
57
private
:
58
std::map< winux::String, http::Cookie > _cookies;
59
};
60
61
}
// namespace http
62
63
64
#endif // __HTTP_COOKIES_HPP__
winux::AnsiString
XString< char > AnsiString
Definition:
utilities.hpp:257
winux::int64
__int64 int64
Definition:
utilities.hpp:232
http::Header
代表HTTP头部
Definition:
http_Header.hpp:10
HTTPWRAPPER_DLL
#define HTTPWRAPPER_DLL
Definition:
http_base.hpp:24
winux::String
XString< tchar > String
Definition:
utilities.hpp:261
http
HTTP协议的相关简单类封装
Definition:
http_base.hpp:32
http::Cookies::Cookies
Cookies()
Definition:
http_Cookies.hpp:11
http::Cookie
封装了Cookie的http协议细节
Definition:
http_Cookie.hpp:8
http::Cookies::has
bool has(winux::String const &name) const
检测是否有该cookie
Definition:
http_Cookies.hpp:45
winux::Mixed
混合体,能表示多种类型的值
Definition:
utilities.hpp:1440
http::Cookies
提供操作Cookies相关的功能
Definition:
http_Cookies.hpp:8
http::Cookies::clear
void clear()
清空内部的映射表
Definition:
http_Cookies.hpp:29
dist
x64
include
http_Cookies.hpp
生成于 2024年 十二月 24日 星期二 01:35:06 , 为 fastdo使用
1.8.11