Closed oz123 closed 5 years ago
These are two completely different things. url_args
contains values extracted from dynamic parts in the request path. It's populated by the router that matches request path against bottle routes. It is therefor only available after routing. query
is the parsed request query string (the part after the ?
). The query string is never in url_args
.
For example, if the route is defined by @route('/hello/<name>')
and a request is made for /hello/world?some=query
then request.url_args
will be {'name':'world'}
and request.query
will be {'some':'query'}
.
@defnull thanks for the quick response.
What is the difference between the two if any?
Sometime the information passed through is in
url_args
and sometime inquery
. See this debugging session for example:So at first the query string is in
url_args
and later it is inquery
. Alsourl_args
is now empty. I have checked also that in both break points the request object is the same object.Can you explain what is going on here?