We start out by adding the routes for the contact form page and the contact confirmation page:
r.Handle("/contact", handlers.ContactHandler(env)).Methods("GET", "POST") r.Handle("/contact-confirmation", handlers.ContactConfirmationHandler(env)).Methods("GET")
Note that the /contact route that we have registered, which will be handled by the ContactHandler function, will accept HTTP requests using both the GET and the POST method. When the contact form is first accessed, it will be through a GET request to the /contact route. When the user submits the contact form, they will initiate a POST request to the /contact route. This explains why this route accepts both of these HTTP methods.
Upon successfully filling ...