@@ -55,14 +55,26 @@ class http_request
5555 {
5656 return this ->user ;
5757 }
58+ /* *
59+ * Method used to get the username eventually passed through basic authentication.
60+ * @param result string that will be filled with the username
61+ **/
5862 void get_user (std::string& result) const
5963 {
6064 result = this ->user ;
6165 }
66+ /* *
67+ * Method used to get the username extracted from a digest authentication
68+ * @return the username
69+ **/
6270 const std::string get_digested_user () const
6371 {
6472 return this ->digested_user ;
6573 }
74+ /* *
75+ * Method used to get the username extracted from a digest authentication
76+ * @param result string that will be filled with the username
77+ **/
6678 void get_digested_user (std::string& result) const
6779 {
6880 result = this ->digested_user ;
@@ -75,6 +87,10 @@ class http_request
7587 {
7688 return this ->pass ;
7789 }
90+ /* *
91+ * Method used to get the password eventually passed through basic authentication.
92+ * @param result string that will be filled with the password.
93+ **/
7894 void get_pass (std::string& result) const
7995 {
8096 result = this ->pass ;
@@ -87,6 +103,10 @@ class http_request
87103 {
88104 return this ->path ;
89105 }
106+ /* *
107+ * Method used to get the path requested
108+ * @param result string that will be filled with the path.
109+ **/
90110 void get_path (std::string& result) const
91111 {
92112 result = this ->path ;
@@ -99,7 +119,12 @@ class http_request
99119 {
100120 return this ->post_path ;
101121 }
102- int get_path_pieces (std::vector<std::string>& result) const
122+ /* *
123+ * Method used to get all pieces of the path requested; considering an url splitted by '/'.
124+ * @param result vector of strings containing the path
125+ * @return the size of the vector filled
126+ **/
127+ size_t get_path_pieces (std::vector<std::string>& result) const
103128 {
104129 result = this ->post_path ;
105130 return result.size ();
@@ -108,12 +133,13 @@ class http_request
108133 * Method used to obtain the size of path in terms of pieces; considering an url splitted by '/'.
109134 * @return an integer representing the number of pieces
110135 **/
111- int get_path_pieces_size () const
136+ size_t get_path_pieces_size () const
112137 {
113138 return this ->post_path .size ();
114139 }
115140 /* *
116141 * Method used to obtain a specified piece of the path; considering an url splitted by '/'.
142+ * @param index the index of the piece selected
117143 * @return the selected piece in form of string
118144 **/
119145 const std::string get_path_piece (int index) const
@@ -122,6 +148,12 @@ class http_request
122148 return this ->post_path [index];
123149 return " " ;
124150 }
151+ /* *
152+ * Method used to obtain a specified piece of the path; considering an url splitted by '/'.
153+ * @param index the index of the piece selected
154+ * @param result a string that will be filled with the piece found
155+ * @return the length of the piece found
156+ **/
125157 size_t get_path_piece (int index, std::string& result) const
126158 {
127159 if (((int )(this ->post_path .size ())) > index)
@@ -143,6 +175,10 @@ class http_request
143175 {
144176 return this ->method ;
145177 }
178+ /* *
179+ * Method used to get the METHOD used to make the request.
180+ * @param result string that will be filled with the method.
181+ **/
146182 void get_method (std::string& result) const
147183 {
148184 result = this ->method ;
@@ -152,35 +188,75 @@ class http_request
152188 * @return a vector<pair<string,string> > containing all headers.
153189 **/
154190 const std::vector<std::pair<std::string, std::string> > get_headers () const ;
191+ /* *
192+ * Method used to get all headers passed with the request.
193+ * @param result a vector<pair<string, string> > that will be filled with all headers
194+ * @result the size of the vector
195+ **/
155196 size_t get_headers (std::vector<std::pair<std::string, std::string> >& result) const ;
156197#ifndef SWIG
198+ /* *
199+ * Method used to get all headers passed with the request.
200+ * @param result a map<string, string> > that will be filled with all headers
201+ * @result the size of the map
202+ **/
157203 size_t get_headers (std::map<std::string, std::string, header_comparator>& result) const ;
158204#endif
159205 /* *
160206 * Method used to get all footers passed with the request.
161207 * @return a vector<pair<string,string> > containing all footers.
162208 **/
163209 const std::vector<std::pair<std::string, std::string> > get_footers () const ;
210+ /* *
211+ * Method used to get all footers passed with the request.
212+ * @param result a vector<pair<string, string> > that will be filled with all footers
213+ * @result the size of the vector
214+ **/
164215 size_t get_footers (std::vector<std::pair<std::string, std::string> >& result) const ;
165216#ifndef SWIG
217+ /* *
218+ * Method used to get all footers passed with the request.
219+ * @param result a map<string, string> > that will be filled with all footers
220+ * @result the size of the map
221+ **/
166222 size_t get_footers (std::map<std::string, std::string, header_comparator>& result) const ;
167223#endif
168224 /* *
169225 * Method used to get all cookies passed with the request.
170226 * @return a vector<pair<string, string> > containing all cookies.
171227 **/
172228 const std::vector<std::pair<std::string, std::string> > get_cookies () const ;
229+ /* *
230+ * Method used to get all cookies passed with the request.
231+ * @param result a vector<pair<string, string> > that will be filled with all cookies
232+ * @result the size of the vector
233+ **/
173234 size_t get_cookies (std::vector<std::pair<std::string, std::string> >& result) const ;
174235#ifndef SWIG
236+ /* *
237+ * Method used to get all cookies passed with the request.
238+ * @param result a map<string, string> > that will be filled with all cookies
239+ * @result the size of the map
240+ **/
175241 size_t get_cookies (std::map<std::string, std::string, header_comparator>& result) const ;
176242#endif
177243 /* *
178244 * Method used to get all parameters passed with the request. Usually parameters are passed with DELETE or GET methods.
179245 * @return a map<string,string> containing all parameters.
180246 **/
181247 const std::vector<std::pair<std::string, std::string> > get_args () const ;
248+ /* *
249+ * Method used to get all args passed with the request.
250+ * @param result a vector<pair<string, string> > that will be filled with all args
251+ * @result the size of the vector
252+ **/
182253 size_t get_args (std::vector<std::pair<std::string, std::string> >& result) const ;
183254#ifndef SWIG
255+ /* *
256+ * Method used to get all args passed with the request.
257+ * @param result a map<string, string> > that will be filled with all args
258+ * @result the size of the map
259+ **/
184260 size_t get_args (std::map<std::string, std::string, arg_comparator>& result) const ;
185261#endif
186262 /* *
0 commit comments