title: Executing a post request from a flask route to a remote service
body: <p>I am encountering some issues to create and execute a post request from one of my flask @app.route. The idea would be to validate and process the data received from a web form by the server, then to call a remote service with this data as a post parameter and finally to be redirected to a new page indicated by this remote service. This is a simplified skeleton :</p>
  
  <pre><code>import requests
  
  @app.route('/test', methods=['POST'])
  
      url = 'http://exemple.com'
      headers = {'Content-type': 'text/html; charset=UTF-8'}
      response = requests.post(url, data=data, headers=headers)
  
      return x
  </code></pre>
  
  <p>Any hint about how am I supposed to redirect the user to the remote service using a post request (user that will then again be redirected by the remote service to another page)?</p>
  
  <p>Thank you in advance.</p>