Receiving form data
Form data can be sent using HTTP GET
or POST
requests and the choice of method determines how the data contained in the form is presented. Listing 11.9 completes the form to specify the URL to which the form data will be sent and adds buttons that submit the form data with different HTTP methods.
Listing 11.9: Completing the form in the index.html file in the static folder
<!DOCTYPE html>
<html>
<head>
<script src="/bundle.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<form action="/form">
<div class="m-2">
<label class="form-label">Name</label>
<input name="name" class="form-control" />
</div>
<div class="m-2">
<label...