I am running a node.js server, and I have an index.html file. The html file has a form with some data, and a script
<script>document.getElementById("form").submit();</script>
When I visit the page in a browser, the form submits automatically, sending a post request to the action.
However, if I run a get request in postman or axios to the index.html file, the script does not run, it just returns the text of the index.html file.
I presume this is because the browser runs the script, but how can I simulate this behaviour in node.js?