如何传递单个网址参数的多个值?
可以在不使用自己的分隔符的情况下传递单个URL参数的多个值?
Is it possible to pass multiple values for a single URL parameter without using your own separator?
我想做的是后端期望输入参数 urls
具有一个或多个值。我可以将其设置为单个或多个URL。什么是设置urls参数的方法,以便它可以有多个值?我不能使用我自己的分隔符,因为它可以是值本身的一部分。
What I want to do is that the backend expects an input parameter urls
to have one or more values. It can me set to a single or multiple URLs. What is a way to set the urls parameter so it can have multiple values? I can't use my own separator because it can be part of the value itself.
示例:
http://example.com/?urls= [value,value2 ...]
Example: http://example.com/?urls=[value,value2...]
urls
参数设置为 http://google.com
或者可以设置至 http://google.com
http://yahoo.com ...
。在后端,我想将每个url作为一个单独的值进行处理。
The urls
parameter be set to just http://google.com
or it can be set to http://google.com
http://yahoo.com ...
. In the backend, I want to process each url as a separate values.
http://.../?urls=foo&urls=bar&...
...
request.GET.getlist('urls')