@@ -140,66 +140,22 @@ class http_request
140140 * Method used to get all headers passed with the request.
141141 * @return a vector<pair<string,string> > containing all headers.
142142 **/
143- const std::vector<std::pair<std::string, std::string> > get_headers () const
144- {
145- std::vector<std::pair<std::string, std::string> > to_ret;
146- std::map<std::string, std::string, header_comparator>::const_iterator it;
147- for (it = headers.begin (); it != headers.end (); it++)
148- #ifdef USE_CPP_ZEROX
149- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
150- #else
151- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
152- #endif
153- return to_ret;
154- }
143+ const std::vector<std::pair<std::string, std::string> > get_headers () const ;
155144 /* *
156145 * Method used to get all footers passed with the request.
157146 * @return a vector<pair<string,string> > containing all footers.
158147 **/
159- const std::vector<std::pair<std::string, std::string> > get_footers () const
160- {
161- std::vector<std::pair<std::string, std::string> > to_ret;
162- std::map<std::string, std::string, header_comparator>::const_iterator it;
163- for (it = footers.begin (); it != footers.end (); it++)
164- #ifdef USE_CPP_ZEROX
165- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
166- #else
167- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
168- #endif
169- return to_ret;
170- }
148+ const std::vector<std::pair<std::string, std::string> > get_footers () const ;
171149 /* *
172150 * Method used to get all cookies passed with the request.
173151 * @return a vector<pair<string, string> > containing all cookies.
174152 **/
175- const std::vector<std::pair<std::string, std::string> > get_cookies () const
176- {
177- std::vector<std::pair<std::string, std::string> > to_ret;
178- std::map<std::string, std::string, header_comparator>::const_iterator it;
179- for (it = cookies.begin (); it != cookies.end (); it++)
180- #ifdef USE_CPP_ZEROX
181- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
182- #else
183- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
184- #endif
185- return to_ret;
186- }
153+ const std::vector<std::pair<std::string, std::string> > get_cookies () const ;
187154 /* *
188155 * Method used to get all parameters passed with the request. Usually parameters are passed with DELETE or GET methods.
189156 * @return a map<string,string> containing all parameters.
190157 **/
191- const std::vector<std::pair<std::string, std::string> > get_args () const
192- {
193- std::vector<std::pair<std::string, std::string> > to_ret;
194- std::map<std::string, std::string, arg_comparator>::const_iterator it;
195- for (it = args.begin (); it != args.end (); it++)
196- #ifdef USE_CPP_ZEROX
197- to_ret.push_back (std::make_pair ((*it).first ,(*it).second ));
198- #else
199- to_ret.push_back (std::make_pair<std::string, std::string>((*it).first ,(*it).second ));
200- #endif
201- return to_ret;
202- }
158+ const std::vector<std::pair<std::string, std::string> > get_args () const ;
203159 /* *
204160 * Method used to get a specific header passed with the request.
205161 * @param key the specific header to get the value from
0 commit comments