title: Username and password authentication in angular
body: <p>I am trying to deploy a flask+angular app, where flask is hosted on a Digital Ocean ubuntu server. </p>
  
  <p>The api is based on this <a href="http://blog.miguelgrinberg.com/post/restful-authentication-with-flask" rel="nofollow">guide</a>. </p>
  
  <p>In curl I can confirm it works by: <code>curl -u &lt;username&gt;:&lt;passwd&gt; -i -X GET https://&lt;server&gt;</code></p>
  
  <p>I try to obtain the same in angular using http: </p>
  
  <p><code>$http.get('https://&lt;server&gt;', 
  {username: &lt;user&gt;, password: &lt;password&gt;})
  .then(function(response){
  console.log(response.data});</code></p>
  
  <p>Results in a 401 UNAUTHORIZED</p>
  
  <p>I hope you can help me here. </p>