Add the option to use FormData to encode the form elements

If the form's enctype attribute is set to "multipart/form-data",
use FormData to encode the form's elements.
This commit is contained in:
Behind The Math
2018-04-18 09:58:12 -04:00
parent 7d26a75fdf
commit 8c8787bac5
3 changed files with 51 additions and 5 deletions

View File

@@ -51,6 +51,9 @@ module.exports = function(location, options, callback) {
break
}
}
else if (requestOptions.formData) {
requestPayload = requestOptions.formData
}
// Add a timestamp as part of the query string if cache busting is enabled
if (options.cacheBust) {