Angular Js Curl -d http request
<p>i have a problem on my angular app :</p>

<p>i have a Curl request that work fine in my terminal :</p>

<pre><code>  curl -d "grant_type=password&amp;client_id=IDXXXXXX&amp;client_secret=SECRET&amp;username=USERNAME&amp;password=PASSWORD" https://MYINSTANCE/oauth_token.do
</code></pre>

<p>now i want to use it with angular JS.</p>

<p>here's what i tried :</p>

<pre><code>var getDatas = {
  grant_type: "password",
  client_id: "ID",
  client_secret : "PASS",
  username : "USER",
  password : "PASSWORD"
}

$http({
  method: 'GET',
  url: 'https://MYINSTANCE/oauth_token.do',
  data : JSON.stringify(getDatas)
}).then(function successCallback(response) {
  alert("response : " + response);
}, function errorCallback(response) {
  alert("error  : " + response);
});
</code></pre>

<p>But the service returns me Error.</p>

<p>I'm a noob on Curl requests with angular, someone can give me some advices?</p>

<p>Thx a lot!</p>

<p>Regards</p>