title: Send a success response to POST request
body: <p>I've got the following ajax call:</p>
  
  <pre><code>function sendRequest(quote, author){
      $.ajax({
          type: "POST",
          url: window.location.pathname,
          data: {quote: quote, author: author},
          dataType: JSON,
          success: function(){console.log("Data sent!");},
          error: function(error){console.log("ran into an error")}
      });
  }
  </code></pre>
  
  <p>And here is my server (using express) handling the post request,</p>
  
  <pre><code>app.post("/", function(req, res){res.status(200).end("Success!")});
  </code></pre>
  
  <p>However, the console doesn't print "<code>Data Sent</code>". Instead, it prints "<code>ran into an error</code>"</p>
  
  <p>Everything else is tested and is working correctly</p>