title: Http Server (Java on Vertx) not getting POST parameter
body: <p>I am sending a ajax request from a client such as:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function() {
          $.ajax({
          url: "http://192.168.1.74:8888",
  
          type: "POST",
          data: ({username: 'Bobby'})
  
      });
  })
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My Http Server is written in Java utilizing vertx is like so:</p>
  
  <pre><code>public class Main extends AbstractVerticle {
  
  
    @Override
    public void start() throws Exception {
  
  
         vertx.createHttpServer().requestHandler(new Handler&lt;HttpServerRequest&gt;() {
          @Override
          public void handle(HttpServerRequest request) {
  
            System.out.println(request.getParam("username"));    
  
          }
      }).listen(8888);
  
    }
  }
  </code></pre>
  
  <p>Every time I run the client, the server writes to console so the request is sent, but the server says the value is null. What am I doing wrong? How do I read the POST parameter being sent from the client?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I found the problem, but no solution. If I change the ajax to GET from POST then it will appear. How do I make it so it works for POST and not for GET? SO the opposite of what is occurring now? </p>
  
  <p>Cheers</p>