title: jQuery .ajax() - add query parameters to POST request?
body: <p>To add query parameters to a url using jQuery AJAX, you do this:</p>
  
  <pre><code>$.ajax({
    url: 'www.some.url',
    method: 'GET',
    data: {
        param1: 'val1'
    }
  )}
  </code></pre>
  
  <p>Which results in a url like <code>www.some.url?param1=val1</code></p>
  
  <p>How do I do the same when the method is POST? When that is the case, <code>data</code> no longer gets appended as query parameters - it instead makes up the body of the request.</p>
  
  <p>I know that I could manually append the params to the url manually before the ajax request, but I just have this nagging feeling that I'm missing some obvious way to do this that is shorter than the ~5 lines I'll need to execute before the ajax call.</p>