@@ -61,136 +61,28 @@ bool http_request::check_digest_auth(
6161 return true ;
6262}
6363
64- const std::vector<std::pair<std::string, std::string> > http_request::get_headers () const
65- {
66- std::vector<std::pair<std::string, std::string> > to_ret;
67- std::map<std::string, std::string, header_comparator>::const_iterator it;
68- for (it = headers.begin (); it != headers.end (); ++it)
69- #ifdef USE_CPP_ZEROX
70- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
71- #else
72- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
73- #endif
74- return to_ret;
75- }
76- size_t http_request::get_headers (std::vector<std::pair<std::string, std::string> >& result) const
77- {
78- std::map<std::string, std::string, header_comparator>::const_iterator it;
79- for (it = headers.begin (); it != headers.end (); ++it)
80- #ifdef USE_CPP_ZEROX
81- result.push_back (std::make_pair ((*it).first ,(*it).second ));
82- #else
83- result.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
84- #endif
85- return result.size ();
86- }
87-
88- #ifndef SWIG
8964size_t http_request::get_headers (std::map<std::string, std::string, header_comparator>& result) const
9065{
9166 result = this ->headers ;
9267 return result.size ();
9368}
94- #endif
95-
96- const std::vector<std::pair<std::string, std::string> > http_request::get_footers () const
97- {
98- std::vector<std::pair<std::string, std::string> > to_ret;
99- std::map<std::string, std::string, header_comparator>::const_iterator it;
100- for (it = footers.begin (); it != footers.end (); ++it)
101- #ifdef USE_CPP_ZEROX
102- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
103- #else
104- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
105- #endif
106- return to_ret;
107- }
108- size_t http_request::get_footers (std::vector<std::pair<std::string, std::string> >& result) const
109- {
110- std::map<std::string, std::string, header_comparator>::const_iterator it;
111- for (it = footers.begin (); it != footers.end (); ++it)
112- #ifdef USE_CPP_ZEROX
113- result.push_back (std::make_pair ((*it).first ,(*it).second ));
114- #else
115- result.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
116- #endif
117- return result.size ();
118- }
11969
120- #ifndef SWIG
12170size_t http_request::get_footers (std::map<std::string, std::string, header_comparator>& result) const
12271{
12372 result = this ->footers ;
12473 return result.size ();
12574}
126- #endif
127-
128- const std::vector<std::pair<std::string, std::string> > http_request::get_cookies () const
129- {
130- std::vector<std::pair<std::string, std::string> > to_ret;
131- std::map<std::string, std::string, header_comparator>::const_iterator it;
132- for (it = cookies.begin (); it != cookies.end (); ++it)
133- #ifdef USE_CPP_ZEROX
134- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
135- #else
136- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
137- #endif
138- return to_ret;
139- }
140-
141- size_t http_request::get_cookies (std::vector<std::pair<std::string, std::string> >& result) const
142- {
143- std::map<std::string, std::string, header_comparator>::const_iterator it;
144- for (it = cookies.begin (); it != cookies.end (); ++it)
145- #ifdef USE_CPP_ZEROX
146- result.push_back (std::make_pair ((*it).first ,(*it).second ));
147- #else
148- result.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
149- #endif
150- return result.size ();
151- }
15275
153- #ifndef SWIG
15476size_t http_request::get_cookies (std::map<std::string, std::string, header_comparator>& result) const
15577{
15678 result = this ->cookies ;
15779 return result.size ();
15880}
159- #endif
160-
161- const std::vector<std::pair<std::string, std::string> > http_request::get_args () const
162- {
163- std::vector<std::pair<std::string, std::string> > to_ret;
164- std::map<std::string, std::string, arg_comparator>::const_iterator it;
165- for (it = args.begin (); it != args.end (); ++it)
166- #ifdef USE_CPP_ZEROX
167- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
168- #else
169- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
170- #endif
171- return to_ret;
172- }
173-
174- size_t http_request::get_args (std::vector<std::pair<std::string, std::string> >& result) const
175- {
176- std::map<std::string, std::string, header_comparator>::const_iterator it;
177- for (it = args.begin (); it != args.end (); ++it)
178- #ifdef USE_CPP_ZEROX
179- result.push_back (std::make_pair ((*it).first ,(*it).second ));
180- #else
181- result.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
182- #endif
183- return result.size ();
184- }
18581
186- #ifndef SWIG
18782size_t http_request::get_args (std::map<std::string, std::string, arg_comparator>& result) const
18883{
18984 result = this ->args ;
19085 return result.size ();
19186}
192- #endif
193-
194-
19587
19688};
0 commit comments