How To Redirect From A Json Response?
So I am trying to use Flask and a Javascript uploader(Dropzone) to upload files and redirect after the upload is complete. Files are getting uploaded fine, but using the traditiona
Solution 1:
You can set the mimetype for the response:
response = redirect('http://somesite.com')
response.mimetype = 'application/json'return response
Or:
return make_response(redirect('http://example.com'), mimetype='application/json')
Post a Comment for "How To Redirect From A Json Response?"