title: How to check the progress of the post request?
body: <p>I am using python requests package to send a post request to the server. It will invoke a long-time running function in the server side. The server side looks like this:</p>
  <pre><code>from flask import Flask
  import time
  
  server = Flask(__name__)
  
  
  # for example this program takes 100 seconds to finish
  def dummy_program(times_to_run=100):
      count = 0
      for i in range(times_to_run):
          count += 1
          time.sleep(1)
  
  
  @server.route(&quot;task&quot;, methods=[&quot;post&quot;])
  def app():
      dummy_program()
  
      return {'body': 'finished'}, 200
  </code></pre>
  <p>The client side will send a post request <code>response = requests.post('{}/task'.format(url), files=files, data=data)</code> to this server, and client will only recieve a response after 100 second when the process finished.</p>
  <p><strong>My question is how can I report the progress to the client? for example using a progress bar</strong>.</p>
  <p>Many thanks!</p>