I am running a node http server on Replit. The html page has a form element in it. The form's method is POST. When I click on the submit button 2 requests are made to the action. 1st the POST and then a GET with empty fields.
<form action="/example" method="post" enctype="multipart/form-data">...input elements...</form>
I have logged both a POST and then a GET method.
I have logged successful form-data in the POST request.
When the GET request is called the POST form-data is lost.
I don't want a global variable that captures the previous POST form-data and remembers it for the GET request because...
- I think it's an error, there shouldn't be any GET request to begin with.
- I want multiple users connected at a time.