Getting the array as GET query parameters in Python

前端 未结 2 1072
抹茶落季
抹茶落季 2020-12-24 05:17

I know in php I could just use $_GET[\'key1\'][\'key2\'] to retrieve GET data that is sent in the form of an array but is that something possible in Python as I

2条回答
  •  天涯浪人
    2020-12-24 05:54

    The deep parsing of argument names is unique for PHP AFAIK.

    If you need just a simple list, just pass several parameters with the same name and use request.args.getlist() (documentation).

    Otherwise you have to parse the query string yourself.

提交回复
热议问题