Merge branch 'pr_2078' into dev

This commit is contained in:
Nick O'Leary
2019-03-06 15:51:16 +00:00
2 changed files with 33 additions and 16 deletions

View File

@@ -78,5 +78,18 @@
<p>If <code>msg.payload</code> is an Object, the node will automatically set the content type
of the request to <code>application/json</code> and encode the body as such.</p>
<p>To encode the request as form data, <code>msg.headers["content-type"]</code> should be set to <code>application/x-www-form-urlencoded</code>.</p>
<h4>File Upload</h4>
<p>To perform a file upload, <code>msg.headers["content-type"]</code> should be set to <code>multipart/form-data</code>
and the <code>msg.payload</code> passed to the node must be an object with the following structure:</p>
<pre>{
"KEY": {
"value": FILE_CONTENTS,
"options": {
"filename": "FILENAME"
}
}
}</code></pre>
<p>The values of <code>KEY</code>, <code>FILE_CONTENTS</code> and <code>FILENAME</code>
should be set to the appropriate values.</p>
</script>