Is it possible to make a post request in Node/Express with only HTML and Server-side(Node) js?
(HTML)
<form action="/submit-test" method="post">
<input type="text" name="id">
<button type="submit">Submit</button>
</form>
(Node.js)
const express = require('express');
const app = express();
app.post('/submit-test', (req, res, next) => {
console.log('submit testing');
...
});
Or do I always need some client javascript to "emit" the post? (e.g. with request, XMLHttpRequest, or fetch API?)