title: Python flask server won't receive anything when called from ifttt webhook
body: <p>So i am pretty new to Python Web servers and was following this question</p>
  
  <p><a href="https://stackoverflow.com/questions/43600445/how-to-setup-a-raspberry-pi-to-receive-webhooks">How to setup a Raspberry Pi to receive webhooks</a></p>
  
  <p>to receive a webhook from <a href="https://ifttt.com/maker_webhooks" rel="nofollow noreferrer">Ifttt</a> in order to control my TV and AC but my server does't show any message from the <a href="https://ifttt.com/maker_webhooks" rel="nofollow noreferrer">Ifttt</a> server. I have checked that my server is visible from the internet and i can trigger it using a proxy.  </p>
  
  <p>Python Code:</p>
  
  <pre><code>from flask import Flask
  import subprocess
  
  app = Flask(__name__)
  
  tv_Power = "irsend SEND_ONCE TV KEY_POWER"
  AC_On = "irsend SEND_ONCE AC on on on on on on"
  AC_Off = "irsend SEND_ONCE AC off off off off off off off off off off off off off"
  
  @app.route('/', methods = ['POST'])
  def index():
      return 'Choose Option'
  
  @app.route('/tv_Power',methods=['POST'])
  def pow():
      process = subprocess.Popen(tv_Power.split(), stdout=subprocess.PIPE)
      output, error = process.communicate()
      return 'Changing TV State'
  
  @app.route('/AC_On',methods=['POST'])
  def acon():
      process = subprocess.Popen(AC_On.split(), stdout=subprocess.PIPE)
      output, error = process.communicate()
      return 'Turning AC On'
  
  @app.route('/AC_Off',methods=['POST'])
  def acoff():
      process = subprocess.Popen(AC_Off.split(), stdout=subprocess.PIPE)
      output, error = process.communicate()
      return 'Turning AC Off'
  
  if __name__ == '__main__':
      app.run(debug=True, host='0.0.0.0')
  </code></pre>
  
  <p><a href="https://ifttt.com/maker_webhooks" rel="nofollow noreferrer">Ifttt webhook</a> settings:</p>
  
  <p><a href="https://i.stack.imgur.com/VkYaT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VkYaT.jpg" alt="enter image description here"></a></p>