Re: [Cppcms-users] how to parsing complex variables and its values in URL
Brought to you by:
artyom-beilis
|
From: Stanimir M. <sta...@zo...> - 2014-06-20 05:36:06
|
You have request().get() -> http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1request.html#a36d72816584f61d3c5b7e510d61a5f58 which returns std::multimap<std::string,std::string> The first is your parameter name and the second its value. Note that a parameter could be any type serialized as string. Like an ISO Date (2014-05-24). It is you responsibility to parse those values and convert them to your appropriate c++ representation, since CppCms can't know every type you need. Stanimir On Thu, Jun 19, 2014 at 10:12 PM, sergey lavrov <ccp...@gm...> wrote: > Dear All! > > I need to parsing complex variables and its values in URL which have the > form like: > variable[index1][index2]...[indexN]=X, where index1-N,X could be integer, > string, boolean. > For example, such notation have new version of jquery DataTables 1.10.0. > http://datatables.net/manual/server-side > Also such associative array notations using in variables in forms. > > What is the best way to parse such complex variables and its values? > > The best option for me is packing variables and it's values from URL to > c++ structures as is done in php and other languages. > Unfortunately cppcms::http::request or other classes haven't such > functionality. > > Thanks in advance! > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |