Not all request parameters showing ajax node.js
<p>I am building an app using node.js and have a GET endpoint in the form:</p>

<p><code>/api/car/:id</code></p>

<p>I have a GET request like:</p>

<pre><code>var data = {
    color: 'red',
    mileage: '1000'
};

$.ajax({
    type: "GET",
    url: "/api/car/12345",
    data: {color: 'red', mileage: '1000'},
    success: function(data) {
        console.log(data)
    },
    error: function() {
        console.log('some error occurred');
    }
});
</code></pre>

<p>When I console.log the parameters on the server side I only get the '12345' but I do not get the parameters defined in <code>data</code>:</p>

<p><code>console.log(req.params)</code></p>

<p><code>{ id: '12345' }</code></p>

<p>Whereas it should be something like:</p>

<p><code>{ id: '12345', color: 'red', mileage: '1000' }</code></p>

<p>Can someone help? I need to use all 3 parameters on the server side...</p>

<p>Thanks in advance!</p>