title: How Node.js https post JSON field looks in jquery format?
body: <p>My question is Node uses request.write to send JSON post request and jquery's AJAX uses the 'data' field. Do I understand it right?</p>
  
  <p>Here my node.js</p>
  
  <pre><code>const apiToken = "eae5819bd5e14803a1abff8141c36ee6";
  const contentJSON = JSON.stringify({
    'contestId': "0ac3ac99-0509-456a-8ff6-9f193048c4f3",
    'contesttype': "OverUnder",
    'direction': "moon",
    'wager': "0.001"
  });
  
  const https = require('https');
  const options = {
      hostname: 'beta.hxro.io',
      port: 443,
      path: '/hxroapi/api/ContestEntry/add-contest-entry',
      method: 'POST',
      headers: {
          'Content-Type':'application/json',
          'Ocp-Apim-Subscription-Key': 'agh383j89dh93ij9',
          }
  }
  
  const req = https.request(options, (res) =&gt; {
      res.on('data', (d) =&gt; {
          console.log(JSON.parse(d));
      });
  });
  
  req.on('error', (error) =&gt; {
      console.error(error);
  });
  
  req.write(contentJSON);
  req.end();
  </code></pre>
  
  <p>This is what I think in jQuery it will look like:</p>
  
  <pre><code>contentJSON = {
    contestId: contestId,
    userId: "AB",
    contesttype: "OverUnder",
    direction: "moon",
    wager: "0.00005"
  };
  console.log(contentJSON);
  $.ajax({
    type: "POST",
    url: "https://beta.hxro.io/hxroapi/api/ContestEntry/add-contest-entry",
    data: JSON.stringify(contentJSON),
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    headers: {
      "Content-Type": "application/json",
      "Ocp-Apim-Subscription-Key": "sa77euhe83ji40ie"
    },
    success: function(data) {
      console.log(data);
    },
    failure: function(errMsg) {
      alert(errMsg);
    }
  });
  
  </code></pre>
  
  <p>Node's one works but not the jquery. JS solutions are welcome.</p>