title: How to make a POST with XML body/content-type header using request promise native in Node?
body: <p>I need to make an XML POST (I know don't ask it's government...) and I can't get it to work with node request promise native.</p>
  
  <p>I have tried turning my string of XML into a buffer, String(), .toString etc. The POST works if I turn json:true so I don't think it's a networking issue ( when passed a xml string with json true it sends a json like { 'variablename': 'stringed XML that I want to send as the body' } )</p>
  
  <p>Here is what I'm working with. I've been banging my head for a while here any help appreciated.</p>
  
  <p>Would ideally be promise/async.</p>
  
  <p>Maybe I should look to find a XMLHttp request npm module?</p>
  
  <pre><code>var request_promise_native_options = {
          method: 'POST',
          uri: 'http://requestbin.fullcontact.com/198flbs1',
          headers: {
              'User-Agent': 'Request-Promise',
              'Content-Type': 'text/xml'
              //'Content-Length': Buffer.byteLength(my_xml_string) //I've tried multiple ways to use this
          },
          body: {
              my_xml_string //also tried many ways here Buffer, String() etc
          },
          json: false // automatically stringifys body to json if true
      };
  
      request_promise(request_promise_native_options)
              .then(function (response) {
                  console.log("success");
              })
              .catch(function (err) {
                  console.log(err);
              })
  </code></pre>