title: Post using multipart/form-data with bent in node.js
body: <p>I am trying to use <code>bent</code> to <code>POST</code> in node.js and I have been able to post <code>application/json</code> with below code and received the data at the other end.</p>
  <pre><code>const bent = require('bent');
  const postJSON = bent('POST', 'json', { 'Content-Type': 'application/json'});
  const field = 'data';
  
  return await postJSON('http://localhost/endpoint', { field });
  </code></pre>
  <p>However when I do <code>multipart/form-data</code> with the below code, no error occurred but I didn't receive any data at the other end.</p>
  <pre><code>var FormData = require('form-data');
  var form = new FormData();
  form.append('my_field', 'my value');
  form.append('my_buffer', 'my data');
  
  const bent = require('bent');
  //const postJSON = bent('POST', 'string', { 'Content-Type': 'multipart/form-data'});
  const postJSON = bent('POST', 'buffer', { 'Content-Type': 'multipart/form-data'});
  
  return await postJSON('http://localhost/endpoint', form);
  </code></pre>