From the course: Full Stack Web Development with Flask
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Accessing data via request and response objects - Flask Tutorial
From the course: Full Stack Web Development with Flask
Accessing data via request and response objects
- [Instructor] Accessing Data via Request and Response Objects. In this video, we'll be looking at two global objects called the Request and Response. But, before we do that we got to look at something called the URL variables and see what they are, and we'll also look at two of the most common HTTP methods called the GET and the POST and we'll dive a little bit deeper into the Request and Response objects and also, got a little note here saying that both the Request and Response objects are all JSON API format. So, here at the Request object, usually you can use that to get data or access data using the GET method, so, you are using something called the args object to get the data and there are two methods to do that and if you are using a web form and you are posting that in the POST method, then you want to use the form object instead of the arguments or the args. So, that's pretty straightforward. Now, the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Creating the base template8m 28s
-
(Locked)
Creating child templates6m 54s
-
(Locked)
Passing data to the view10m 27s
-
(Locked)
Accessing data via request and response objects1m 37s
-
(Locked)
URL variables6m 34s
-
(Locked)
Working with the GET method9m 46s
-
(Locked)
Working with the POST method3m 2s
-
(Locked)
Sending a JSON response8m 1s
-
-
-
-