Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bottle - Is it possible to retrieve URL without parameters?

Tags:

python

bottle

I have an URL of the form:

http://www.foo.com/bar?arg1=x&arg2=y

If I do:

request.url

I get:

http://www.foo.com/bar?arg1=x&arg2=y

Is it possible to get just http://www.foo.com/bar?

like image 954
M.E. Avatar asked Nov 06 '25 16:11

M.E.


1 Answers

Looks like request.urlparts.path might be a way to do it.

Full documentation here.

like image 197
M.E. Avatar answered Nov 08 '25 09:11

M.E.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!