title: Drupal login via Rest server
body: <p>I'm developing a website who uses an external Drupal for the articles and pages.
  The purpose is to show the articles in a website using just html/css/js.</p>
  
  <p>I've added an Rest Server module to the drupal back-end so I can do http requests for retreiving the articles. Now retreiving the articles from the drupal back-end works (see code below). Restdrupal is the name of my site and restendpoint is the name of the Rest server's endpoint (Captian Obvious)</p>
  
  <pre><code>$.ajax({
      url : "http://127.0.0.1/restdrupal/restendpoint/node.json",
      dataType : 'json',
      success : function(data) {
                //further code
      }
  });
  </code></pre>
  
  <p>Now I want my customer to be able to add some articles, so I need to login first.
  I've been searching the internet for days now and tried a million things but nothing worked for me. The latest thing i've tried (with jQuery) was this :</p>
  
  <pre><code>$.ajax({
      url : "http://127.0.0.1/restdrupal/restendpoint/user/login",
      dataType:'application/json',
      type : 'PUT',
      data : 'Name=myusername&amp;Pass=mypassword',
      success : function(data) {
          //further code
      },
      error:function(data){
             //Error handling
      }
  });
  </code></pre>
  
  <p>I've also changed the PUT into POST...</p>
  
  <p>The response i'm getting is (no mather what I do) the same : </p>
  
  <pre><code>406 Not Acceptable: Unsupported request content type application/x-www-form-urlencoded
  </code></pre>
  
  <p>Could please somebody help me?
  Kind regards,
  Ceetn</p>