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