title: How to make CORS-enabled HTTP requests in Angular 2?
body: <p>The error is the following:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="http://some_url.herokuapp.com/api/some_api/" rel="nofollow noreferrer">http://some_url.herokuapp.com/api/some_api/</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>' is therefore not allowed access. The response had HTTP status code 503.</p>
  </blockquote>
  
  <p>when calling</p>
  
  <pre><code>return this._http.post(requestUrl, JSON.stringify(requestBody), requestOptions)
  </code></pre>
  
  <p>I had troubles with CORS (when working with <strong>Angular 1</strong>) in the past and I remember that once CORS were activated server-side,I had to <strong>transform the http request to parse certain HTTP headers</strong>.</p>
  
  <p>I am quite confused about how it should work, so any explanation is very welcome.</p>