Categories
Flask how to redirect an external link and put new post data?
@blueprint.route('/redirect_me') def redirect_me(): payload = {'key': 'value'} return redirect('http://external.com', payload=payload)
Answer the question
In order to leave comments, you need to log in
It's easier to give the browser an html page On which the js script will be executed and make a post request.
$.post('http://external.com', {'key':'value'}, function(data){ window.location = data.redirect; });
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question