title: how send Post request with ajax in ember.js?
body: <p>I want to send a POST (not GET) request to the server with ember.js. I don't know which function I need at <strong>"which function here"</strong>, but I want to send it to the server for a login request.</p>
  
  <pre><code>App.LoginController = Ember.ObjectController.extend({
    actions: {
      userLogin: function(user) {
        // which function here? 
        ?? ("http://siteurl/api/authentication/login/&amp;username=" + user.username + "&amp;password=" + user.password + ""); 
        this.transitionTo('cat');
  
      },
  
      cancelLogin: function() {
        this.transitionTo('menu');
      }
    }
  });
  
  App.UserFormComponent = Ember.Component.extend({
    actions: {
      submit: function() {
        this.sendAction('submit', {
          username: this.get('username'),
          password: this.get('password')
        });
      },
  
      cancel: function() {
        this.sendAction('cancel');
      }
    }
  });
  </code></pre>
  
  <p>down here template code</p>
  
  <pre><code>  &lt;script type="text/x-handlebars" data-template-name="login"&gt;
          &lt;header class="bar bar-nav"&gt;
              &lt;h1 class="title"&gt;inloggen&lt;/h1&gt;
              {{#link-to 'menu' class="icon icon icon-bars pull-right"}}{{/link-to}}
          &lt;/header&gt;   
          &lt;!-- SHOW LOADER --&gt;
          &lt;div class="content"&gt;  
          &lt;div class="content-padded"&gt;
          {{user-form submit="userLogin" cancel="cancelLogin" submitTitle="login"}}
          &lt;/div&gt;
    &lt;/script&gt;
  
    &lt;script type="text/x-handlebars" data-template-name="components/user-form"&gt;
     &lt;form {{action "submit" on="submit"}}&gt;
       &lt;p&gt;&lt;label&gt;gebruikersnaam {{input type="text" value=username}}&lt;/label&gt;&lt;/p&gt;
       &lt;p&gt;&lt;label&gt;wachtwoord {{input type="password" value=password}}&lt;/label&gt;&lt;/p&gt;
       &lt;input type="submit" class="btn btn-primary btn-block" {{bindAttr value=submitTitle}}&gt;
       &lt;button class="btn btn-negative btn-block" {{action "cancel"}}&gt;Cancel&lt;/button&gt;
     &lt;/form&gt;
    &lt;/script&gt;
  </code></pre>