title: The type" Headers " has no properties in common with the type" RequestOptionsArgs
body: <p>I get the following error when I try to implement <code>headers</code></p>
  
  <p><a href="https://i.stack.imgur.com/ZC42M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZC42M.png" alt="enter image description here"></a></p>
  
  <p><code>The type" Headers "has no properties in common with the type" RequestOptionsArgs "</code></p>
  
  <p>I was reading that apparently now we should use <code>HttpHeaders</code> but I can not implement it without avoiding the error</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, OnInit } from '@angular/core';
  import { Http, Headers, Response, URLSearchParams } from '@angular/http';
  import 'rxjs/add/operator/toPromise';
  
  @Component({
    selector: 'app-contacto',
    templateUrl: './contacto.component.html',
    styleUrls: ['./contacto.component.scss']
  })
  export class ContactoComponent implements OnInit {
  
    constructor(private http: Http ) { }
  
    ngOnInit() {
    }
  
    sendMessage(){
     
      let url = `https://your-cloud-function-url/function`
      let params: URLSearchParams = new URLSearchParams();
      let headers = new Headers({'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });
  
      params.set('to', 'user@example.com');
      params.set('from', 'you@yoursupercoolapp.com');
      params.set('subject', 'test-email');
      params.set('content', 'Hello World');
  
      return this.http.post(url, params, headers)
        .toPromise()
        .then(res =&gt; {
          console.log(res)
        })
        .catch(err =&gt; {
          console.log(err)
        })
  
    }
  
  }</code></pre>
  </div>
  </div>
  </p>