title: jquery ajax get to node express, how to get json data?
body: <p>I'm trying to send the node instance JSON data using an ajax get request clientside as shown below:</p>
  
  <pre><code>var parameters = { username: 'test' };
      $.ajax({
        url: url,
        data: JSON.stringify(parameters),
        success: function {},
        dataType: 'json'
      });
  </code></pre>
  
  <p>Using firebug, I can see it sends encoded <a href="http://server/web_svc?username=test" rel="noreferrer">http://server/web_svc?username=test</a> </p>
  
  <p>in my node express method:</p>
  
  <pre><code>function svc_method(req, res)
  {
     var username = req.body.username;
  }
  </code></pre>
  
  <p>req.body.username is undefined. It only works if I post instead of get.</p>
  
  <p>How do I fix this issue? I do have the app.use(express.bodyParser()) line at the top of app.configure().</p>