title: Why is the python client not receiving SSE events?
body: <p>I am have a python client listening to SSE events from a server with node.js API</p>
  
  <p>The flow is I sent an event to the node.js API through <code>call_notification.py</code> and run <code>seevents.py</code> in loop using <code>run.sh</code>(see below)</p>
  
  <p>However I don't see that python client is receiving this SSE event? any guidance on why is that?</p>
  
  <p>call_notification.py</p>
  
  <pre><code>import requests
  input_json = {'BATS':'678910','root_version':'12A12'}
  url = 'http://company.com/api/root_event_notification?params=%s'%input_json
  response = requests.get(url)
  print response.text
  </code></pre>
  
  <p>node.js API</p>
  
  <pre><code>app.get("/api/root_event_notification", (req, res, next) =&gt; {
    console.log(req.query.params)
    var events = require('events');
    var eventEmitter = new events.EventEmitter();
  
    //Create an event handler:
    var myEventHandler = function () {
      console.log('new_root_announced!');
      res.status(200).json({
            message: "New root build released!",
            posts: req.query.params
          });
    }
  </code></pre>
  
  <p>seevents.py (python client listening to SSE events)</p>
  
  <pre><code>import json
  import pprint
  import sseclient
  
  def with_urllib3(url):
      """Get a streaming response for the given event feed using urllib3."""
      import urllib3
      http = urllib3.PoolManager()
      return http.request('GET', url, preload_content=False)
  
  def with_requests(url):
      """Get a streaming response for the given event feed using requests."""
      import requests
      return requests.get(url, stream=True)
  
  url = 'http://company.com/api/root_event_notification'
  response = with_urllib3(url)  # or with_requests(url)
  client = sseclient.SSEClient(response)
  #print client.events()
  for event in client.events():
      print "inside"
      pprint.pprint(json.loads(event.data))
  </code></pre>
  
  <p>run.sh</p>
  
  <pre><code>#!/bin/sh
  
  while [ /usr/bin/true ]
  do
      echo "Running sseevents.py"
      python sseevents.py  2&gt;&amp;1 | tee -a sseevents.log.txt
  
      echo "sleeping for 30 sec"
      sleep 30
  done
  </code></pre>
  
  <p>OUTPUT:-</p>
  
  <pre><code>Run call_notification.py on Terminal
  
  node.js API OUTPUT
  
  new_root_announced!
  {'root_version': 'ABCD', 'BATS': '143'}
  
  ./run.sh --&gt; DON'T SEE ABOVE EVENT below
  Running sseevents.py
  sleeping for 30 sec
  Running sseevents.py
  sleeping for 30 sec
  Running sseevents.py
  sleeping for 30 sec
  </code></pre>