title: Typescript Angular2 - complaining about missing types
body: <p>I have the following code:</p>
  
  <pre><code>  var headers = new Headers();
                              // headers.append('Content-Type', 'application/json');
                              headers.append('Content-Type', 'application/x-www-form-urlencoded');
                              this.http.post(
                                  'http://192.168.1.45:3000/testrestapi',
                                  {headers: headers}
                              ).map((res =&gt; res.json())
          .subscribe(data =&gt; {
            // we've got back the raw data, now generate the core schedule data
            // and save the data for later reference
            this.data = data;
        console.log('Friends Provider was a success!');
        console.log(JSON.stringify(data));
            resolve(this.data);
          },
      (err)=&gt;{
          console.log('Error in Friends Provider!');
      },
      ()=&gt;{
             console.log('Friends Provider network call has ended!');
      }
          )
  
         )
     });
  </code></pre>
  
  <p>The code compiles fine without error, but I get the following errors in my ide:</p>
  
  <p><a href="https://i.stack.imgur.com/unT6c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unT6c.png" alt="enter image description here"></a></p>
  
  <p>I am following this docs: <a href="https://angular.io/docs/js/latest/api/http/Http-class.html" rel="nofollow noreferrer">https://angular.io/docs/js/latest/api/http/Http-class.html</a> . It shows how to use HTTP for GET, but not for POST. It seems I am missing the type for my headers which I am unsure what to put here as well it complains about the type for the subscribe method and again I am unsure what to put here as I am following the docs and it does not seem to have anything different?</p>