title: Pushwoosh Angular simple POST request returns 400
body: <p>I'm trying to send a simple POST request to the push-woosh remote API to create a push notification. (code is in coffee, I'm building an app using Ionic Framework)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@sendPushMessage =  -&gt;
          pushMessage = 
              {
                  "request": {
                      "application": PW_APP_ID,
                      "auth": API_TOKEN,
                      "notifications": [{
                          "send_date": "now", 
                          "ignore_user_timezone": true, 
                          "content": "message",
                          "platforms": [1]
                      }]
                  }
              };
          formattedPM = JSON.stringify(pushMessage)
          console.log("JSON sent :"+formattedPM)
          $http.post(createUrl, formattedPM).success((data, status, headers, config) -&gt;
            console.log("success")
            return
          ).error (data, status, headers, config) -&gt;
            console.log("failure")
            return</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that it returns a bad request error 400. It gets the OPTIONS but it never posts the data. I tried to post the exact same data with Postman and it worked gracefully. So here I am wondering why it doesn't work in Chrome.</p>
  
  <p>I also tried to whitelist the domain in the app config, in vain.</p>
  
  <p>Can somebody help me out ? </p>
  
  <p>Thanks </p>