Answer the question
In order to leave comments, you need to log in
How to respond to a request in Python Flask by giving File.txt from a string with text?
Now I have a piece of code that responds with the text Hello world!
@app.route('/text', methods=['POST'])
def caption():
return 'Hello world!'
How to make the browser receive a File.txt file in response with the text Hello world! ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question