title: Required parameter is missing: grant_type while accessing google token in ionic2
body: <p>Required parameter is missing: grant_type while accessing google token in ionic2</p>
  
  <p><strong>ERROR:-</strong> </p>
  
  <pre><code>{
    "error" : "invalid_request",
    "error_description" : "Required parameter is missing: grant_type"
  }
  </code></pre>
  
  <p><strong>code</strong> </p>
  
  <pre><code>    let creds=JSON.stringify({
          'client_id':'251059024984-8113pdtb11gm8m4evdq59stlpvcab8cn.apps.googleusercontent.com',
          'client_secret':'uVWZt_Vd5mMLXGQDo7lmAIUe',
          'redirect_uri':'http://localhost/callback',
          'grant_type':'authorization_code',
          'code':data
      });
      var headers = new Headers();
      headers.append('Content-Type', 'application/x-www-form-urlencoded');
      console.log(data)
  
  
      this.http.post('https://accounts.google.com/o/oauth2/token',creds,{headers: headers}).map(res =&gt; res.json()).subscribe(data =&gt; {
          console.log(data)
      },(error)=&gt;{
          console.log('error in', error);
      })
  </code></pre>
  
  <p>when i check the api in Postman that working perfect</p>
  
  <p><a href="https://i.stack.imgur.com/kEZev.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kEZev.jpg" alt="enter image description here"></a></p>