From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Working with the POST method

Working with the POST method

- Working with the POST method. In this video, we are going to take a look at updating the enrollment form using POST method, adding the GET and POST methods to the route, and accessing form data using the form object, so let's go and take a look. Now let us say we're going to change this to, instead of GET, we'll change this to a POST. Now it's going to send in the head section, in the body of the document, instead of the URL, save that and then go back to routes.py. Again, since it's a form, we have to change these now. This is not going to work, and so it's just to show that it doesn't work, so let's go back to the browser and do another query. Let's refresh this again, try to enroll the first course. As you can see, that is not allowed. It says method not allowed. Now is this something I have to clarify with you a little bit here, the method of the POST is not allowed. It's what I'm trying to tell you. When we tried…

Contents