title: POST contents of a form to rest api
body: <p>I have made a html user login form:</p>
  
  <pre><code>&lt;html &gt;
  &lt;head&gt;
  
  &lt;title&gt;User Login&lt;/title&gt;
  &lt;link rel="stylesheet" href="css/bootstrap.css"&gt;
  &lt;link rel="stylesheet" href="css/signin.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div class="container"&gt;
  &lt;form class="form-signin"&gt;
  &lt;h2 class="form-signin-heading"&gt;Please sign in&lt;/h2&gt;
  &lt;input class="form-control" type="text" autofocus="" required="" placeholder="Email address"&gt;
  &lt;input class="form-control" type="password" required="" placeholder="Password"&gt;
  &lt;label class="checkbox"&gt;
  
  &lt;/label&gt;
  &lt;a href= "" &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Sign in&lt;/button&gt;&lt;/a&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I now need to send the contents of the form, ie the username and password, to a rest api for authentication using the http POST command. I have no idea where to start with this and am having trouble finding a tutorial which assumes absolutely no knowledge of rest APIs and http commands. I'm extremely new to web development, can anyone point me in the direction of a good tutorial, or show me an example of what the javascript (I presume) might look like?</p>