Skip to content
Advertisement

How to use FormData in node.js without Browser?

I want to make a post request in nodejs without browser since it is backend code.

JavaScript

But above code gives me error as FormData not defined. I am working with ES6.

Anybody, who can let me know how to use the FormData in nodejs?

Advertisement

Answer

You can use form-data – npm module. because formData() isn’t NodeJS API

Use it this way,

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement