title: Service worker data with curl
body: <p>In the Chrome Push notification API, I would like to set a customisable notification.</p>
  
  <p>I am talking about service-worker.</p>
  
  <p>Here is the code of the example service worker.</p>
  
  <pre><code>self.addEventListener('push', function(event) { 
   var data = {};
    if (event.data) {
      data = event.data.json();
    }
  
      var title = data.message || "Something Has Happened";
    var body = 'We have received a push message !';  
    var icon = '/images/icon-192x192.png';  
    var tag = 'simple-push-demo-notification-tag';
  
  console.log(event);
  
  
  
    event.waitUntil(  
      self.registration.showNotification(title, {  
        body: body,  
        icon: icon,  
        tag: tag  
      })  
    );  
  });
  </code></pre>
  
  <p><strong>How can I catch the data from a curl message with something like this :</strong></p>
  
  <pre><code>curl --header "Authorization: key=---personnal_key---" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"---ID---\"],\"title\":\"ok\"}"
  </code></pre>
  
  <p>I did read the example, but I can't see one talking about the combination of CURL and service worker together.
  Is  that even possible ?</p>