How to convert this curl to jQuery AJAX POST?
<pre><code>curl --request POST \
--url 'https://usX.api.mailchimp.com/3.0/lists/1234/members' \
--user 'username:api_key' \
--header 'content-type: application/json' \
--data '{"email_address":"user@example.com", "status":"pending"}' \
--include
</code></pre>

<p>I've above curl and it's working fine when I try to add subscriber to my Mailchimp list.</p>

<p>However, I'm not sure how to convert this curl to working jQuery AJAX POST request since I only know how to pass <code>data</code> to AJAX POST.</p>

<p>Since this curl has <code>--user</code>, <code>--header</code> and <code>--include</code>, I don't know how to build the correct AJAX.</p>

<p>Please help.</p>

<pre><code>$.ajax({
    url : "https://usX.api.mailchimp.com/3.0/lists/1234/members",
    type: "POST",
    data: {email_address: "user@example.com", status: "pending"},
    // stuck here - what else should I put?
});
</code></pre>