title: Using DataTables Plugin with GET requests to pass requestbody
body: <p>I have a javascript function <code>fetchGroups()</code> that builds a paged data table using the datatable plugin. The request being passed in is a GET request. I need to pass a <code>fetchMemberGroups</code> object along with the request. I tried sending the request with the request body. But it doesn't seem to work and keeps throwing a <code>500-Internal Server Error</code>. I also don't believe I can pass a request body with a GET. I then tried to pass the <code>fetchMemberGroups</code>object along with the URL by appending a @PathParam annotation on the service method. Could someone tell me how do I pass this object to the service without changing the type of the service to POST or PUT.</p>
  
  <pre><code>function fetchGroups() {
  
  var fetchMemberGroups = new Object();
  fetchMemberGroups.sEcho = 0;
  
  $("#displayGroupsTable").dataTable({
      "bServerSide": true,
      "sAjaxSource":"api/groupService/groups", 
      "bProcessing": true,
      "bJQueryUI": true,
      "bRetrieve": true,
      "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { 
          fetchMemberGroups.iDisplayStart=oSettings._iDisplayStart;
          fetchMemberGroups.iDisplayLength=oSettings._iDisplayLength;
          fetchMemberGroups.sEcho=fetchMemberGroups.sEcho+1;
          oSettings.jqXHR=$.ajax( { 
              "contentType" : 'application/json',
               "dataType": 'json',
               "type": "GET",
               "url": sSource, 
               "data": JSON.stringify(fetchMemberGroups),
               "success": fnCallback
          });},
          "aoColumns": [
                        { "mData": "groupName" },
                        { "mData": "numberOfMembers"},
                        { "mData": "distinguishedName"}
                    ]
  
  });
  }
  </code></pre>
  
  <p>The server side code:</p>
  
  <pre><code>@GET
  @Path("groups")
  @Produces({ MediaType.APPLICATION_JSON })
  @Consumes({MediaType.APPLICATION_JSON})
  public Response getGroups(@Context HttpServletRequest request, PagingObject fetchGroupsObject) {
  }
  </code></pre>