Skip to content
Advertisement

Flask redirect without url params

I have 2 flask app, client and server respectively And I wanna download some files from server by redirecting user directly to the server So basically I want redirect to this route:

JavaScript

So I’m write client like this:

JavaScript

I wanna get url like: http://ipAddress/api/1.0/conf/myGreatToken But get: http://ipAddress/api/1.0/conf/%7B'token':%20'myGreatToken'%7D

And this doesn’t work. How to redirect without params?

Advertisement

Answer

It seems like token is a dict value. Perhaps you could try getting the value for token['token'] and then add it to the url, instead of putting the entire token dict in.

For example:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement