I am passing in a URL as a parameter
GET http://127.0.0.1:5000/?url=https://url.com/?param1=123¶m2=456
When I grab the URL parameter with request.args.get('url')
the value returned is https://url.com/?param1=123
so its stripping off the second parameter in the URL
How can I get all parameters?
You should encode your url, like this
http://127.0.0.1:5000/?url=https%3A%2F%2Furl.com%2F%3Fparam1%3D123%26param2%3D456
use python3
from urllib.parse import urlencode
get_url = '?'.join(['http://127.0.0.1:5000/', urlencode({'url': 'https://url.com/?param1=123¶m2=456'})])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.