如何从 cppcms GET 或 POST URI 中获取参数列表?例如 :
GET uri_servicename?param1=value1
如果它们存在于 URI 中,我想提取此 param1 和 value1。
编辑:我想将它们保存为变量。
了解了 <cppcms/http_request.h> 下的一个名为 query_string() 的方法,它提供了整个查询字符串,包括 http 请求中的所有参数和值。
我们可以将其用作:
std::string paramlist = request().query_string();
参考:
http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1request.html