title: How to post JSON object to web-server in vuejs?
body: <p>I need to get JSON object in web-server from a client. Client - is a browser. Data: username and password. <br>
  Below HTML code:</p>
  
  <pre><code>&lt;form action="/login" method="post"&gt;
      &lt;input type="text" name="username" placeholder"Username"/&gt;
      &lt;input type="password" name="password" placeholder="Password"/&gt;
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I tried vuejs:</p>
  
  <pre><code>new Vue({
      el: '#app',
  
      data: {
          username:'',
          password:'',
      },
  
      methods: {
          send: function () {
                  this.$http.post("/login",
                      JSON.stringify({
                          username: this.username,
                          password: this.password,
                  });)}},
    };
  </code></pre>
  
  <p>But it doesn't work. <br>
  I also tried on jquery but error is the same.<br>
  Error: invalid character 'u' looking for beginning of value.<br>
  Via curl there is no such error.<br></p>
  
  <p>Where I did a mistake? </p>