title: How to add Encoding type in FormData()?
body: <p>Following is my Javascript code, where I would like to set the content type as "multipart/form-data". Help me with how this can be done? Thanks </p>
  
  <pre><code>var client = new XMLHttpRequest();
  var formData = new FormData();
  for(var i=0;i&lt;file.files.length;i++)
      formData.append("nodeDoc[]", file.files[i]);
  formData.append('userId', readCookie('userId'));
  formData.append('passwd', readCookie('passwd'));
  formData.append('treeType', selectedTreeType);
  formData.append('displayName', document.getElementById('displayName').value);
  formData.append('nodeType', document.getElementById('nodeType').value);  
  formData.append('attrList', constructAttrList());
  client.open("post", serverUrl + "node/addNode", true);
  client.send(formData);
   console.log("/node/addNode API called with file");
  </code></pre>