title: Nodejs request-promise error when sending POST request?
body: <p>When I attempt to send a post request, using the request-promise module installed via npm I receive an error and I cannot figure out why.</p>
  
  <p>I have tried removing parts of the options and header but to put it straight I am simply stuck.</p>
  
  <pre><code>    function sendData() {
          var options = {
              method: 'POST',
              uri: `http://www.myurl.com/placeholder.json`,
              body: {
                  "data":"desiredData"
              },
              headers: {
                  "Accept": "application/json",
                  "Accept-Encoding": "gzip, deflate",
                  "Accept-Language": "en-US,en;q=0.9",
                  "Connection": "keep-alive",
                  "Content-Type": "application/x-www-form-urlencoded",
                  "X-Requested-With": "XMLHttpRequest"
              }
          }
          rp(options)
              .then(function (parsedBody) {
                  console.log(parsedBody)
              })
              .catch(function (err) {
                  console.log(err)
              });
      }
  
  sendData();
  </code></pre>
  
  <p>A post request should be sent and log the returned json but instead I receive the following error:</p>
  
  <pre><code>_http_outgoing.js:654
      throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'first argument',
      ^
  
  TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer
      at write_ (_http_outgoing.js:654:11)
      at ClientRequest.write (_http_outgoing.js:629:10)
      at Request.write (C:\Users\ninja_000\Desktop\TronJS\node_modules\request\request.js:1500:27)
      at end (C:\Users\ninja_000\Desktop\TronJS\node_modules\request\request.js:549:18)
      at Immediate.&lt;anonymous&gt; (C:\Users\ninja_000\Desktop\TronJS\node_modules\request\request.js:578:7)
      at runCallback (timers.js:756:18)
      at tryOnImmediate (timers.js:717:5)
      at processImmediate [as _immediateCallback] (timers.js:697:5)
  </code></pre>