Does node-red support FormData()?

Hi,

I need to use Form data to send messages. So used this
var formData = new FormData();

However, I got a reference error: FormData is not defined.

How to use FormData and other syntax supported by js?

Where do you get this error?

If you mean "FormData is not defined" error occurs in a node-red function node - then that is correct - node-red runs in NODE.JS at server side (i.e. NOT in the browser)

Show us what you are doing & where the error occurs.

Hi Steve,

Thanks. I understand JS function runs in the server end. I wanted to send a form data to a server. So I used a function node and wrote:
var formData = new FormData();
data=formData.append('msg', 'aaa');
msg.payload = data;

How to realize it?