Hi folks,
is there any option to call doo.functions.request as multipart/form-data
? Code below does not works because boundary is not set.
var file = new File(["test"])
var url = "test.url"
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "multipart/form-data");
var data = new FormData()
data.append("test", "test")
data.append("file", file)
var requestOptions = {
method: "POST",
headers: myHeaders,
mode: "no-cors",
body: data
};
var resp = await doo.functions.request.custom(url, requestOptions);
console.log(resp);
When I remove Content-Type
form header, then is automatically appended header text/plain;charset=UTF-8
instead of multipart/data-form;boundary=?
Thank you
Petr