title: Use Wicket as a REST API
body: <p>I need Wicket to respond to a post request from AngularJS. </p>
  
  <p>I set up a page in wicket like this but the request parameters are always empty</p>
  
  <pre><code>@MountPath(value = "/api/my/rest/url")
  public class MyPostHandler extends SecureWebPage {
  
      public MyPostHandler () {
          final WebRequest webRequest = (WebRequest) getRequest();
          final HttpServletRequest rawRequest = (HttpServletRequest) webRequest.getContainerRequest();
  
          if (rawRequest.getMethod().equalsIgnoreCase("POST")) {
              webRequest.getRequestParameters().getParameterNames(); //Returns an empty list
              webRequest.getPostParameters().getParameterNames(); //Returns an empty list
          }
      }
  }
  </code></pre>
  
  <p>The AngularJS code that is sending the POST request looks like this:</p>
  
  <pre><code>$http.post('/api/my/rest/url', {some:"data", other:"stuff"});
  </code></pre>
  
  <p>Any idea what's going wrong here?
  Thanks!</p>