1 00:00:00,980 --> 00:00:09,500 Hello, friends, in this video, we shall discuss the attributes of it, request object in a flask 2 00:00:09,650 --> 00:00:12,320 and water flask application framework. 3 00:00:15,380 --> 00:00:23,960 The client's request when the client in his client's browser, you know, gives a certain you all the 4 00:00:24,050 --> 00:00:28,040 request is received by the server. 5 00:00:28,430 --> 00:00:36,890 So the client request is processed by a global request object in order to process this request data. 6 00:00:37,970 --> 00:00:38,940 What do you need to do? 7 00:00:39,110 --> 00:00:45,000 You need to import the request object from the flask module. 8 00:00:45,500 --> 00:00:52,520 So you're allowed to say from flask import request, something like this that should be in the beginning 9 00:00:52,520 --> 00:00:54,200 of your python. 10 00:00:54,200 --> 00:00:58,040 Call the request object. 11 00:00:59,110 --> 00:01:05,740 Sluts are also created as the client sends a certain request that request object has. 12 00:01:06,740 --> 00:01:14,920 A number of important attributes, some of the attributes I will try to explain, first and foremost, 13 00:01:15,450 --> 00:01:20,970 the important object is the form attribute which is available to the request object. 14 00:01:22,120 --> 00:01:25,570 And this form object, form, attribute is. 15 00:01:26,750 --> 00:01:32,870 You know, I believe the value to the format is available, especially when the request is sent, using 16 00:01:33,200 --> 00:01:41,450 either the post method or put method to post and put requests will generate or will have a value to 17 00:01:41,450 --> 00:01:44,320 the form attribute of the request object. 18 00:01:47,160 --> 00:01:55,410 As against that, if the request is sent with the get the matter, then the there will be a certain 19 00:01:55,410 --> 00:02:04,290 value to the Iago's at arguments attribute when the data is received by the server with the help of 20 00:02:04,290 --> 00:02:04,860 a gatemouth. 21 00:02:06,740 --> 00:02:13,640 The value is a barometer or attribute, which is a combination of the and arguments. 22 00:02:14,930 --> 00:02:22,600 Both forms and arguments will form the values attribute cookies is another very important attribute 23 00:02:23,090 --> 00:02:27,080 later on, in the course of our discussion, we'll come across what cookies? 24 00:02:27,470 --> 00:02:30,230 So cookies are nothing but the. 25 00:02:31,500 --> 00:02:38,520 Not all the stored information that the server stores in their clients computer. 26 00:02:39,500 --> 00:02:47,450 So when the client revisits the server along with the request, the cookies are also a transmitter transmitted 27 00:02:47,480 --> 00:02:56,420 or dispatched to the Web server so that later on the server will be able to identify earlier transactions 28 00:02:56,420 --> 00:02:57,870 of the same client with the server. 29 00:02:57,890 --> 00:02:59,190 So for that, the cookies are there. 30 00:02:59,210 --> 00:03:01,620 We'll discuss that part in more detail. 31 00:03:02,060 --> 00:03:08,450 But then cookies is a dictionary object which contains the cookies and the values that are transmitted 32 00:03:08,450 --> 00:03:10,970 by the client to the sun. 33 00:03:15,590 --> 00:03:23,000 It's a very important attribute of the request object, the incoming requests headers, they are stalling 34 00:03:23,240 --> 00:03:29,720 again in the form of a dictionary and they are an attribute of the request. 35 00:03:29,720 --> 00:03:40,820 Object data contains the incoming request that ideastream, especially when the mime type is such that 36 00:03:40,820 --> 00:03:45,710 the application cannot recognize it, then in that case, the data will be treated as a stream. 37 00:03:46,460 --> 00:03:54,170 Files these files attribute will contain the contents of the file, which is uploaded by the client 38 00:03:54,170 --> 00:04:04,010 to this or this is a very important attribute of the request object which will be required for file 39 00:04:04,010 --> 00:04:05,150 uploading activity. 40 00:04:05,720 --> 00:04:09,380 The files attribute also has a very important function called a SEAL. 41 00:04:10,130 --> 00:04:14,670 In order to save the uploaded file on the server, you must execute this same function. 42 00:04:15,440 --> 00:04:21,830 We also have an example of the uploading process further in the course. 43 00:04:22,160 --> 00:04:24,710 During that, we shall discuss this in more detail. 44 00:04:25,370 --> 00:04:34,640 And while this is an underlying WGI environment matter, which method is used to send the request either 45 00:04:34,640 --> 00:04:35,330 get output. 46 00:04:35,330 --> 00:04:36,680 We have seen the different methods. 47 00:04:37,310 --> 00:04:48,260 The request method will identify which method was used and what in the name of the current module is 48 00:04:48,260 --> 00:04:50,340 stored in the attribute called as module. 49 00:04:50,990 --> 00:04:54,320 And lastly, routing exception. 50 00:04:55,870 --> 00:05:05,200 Default value is none when this when this RĂ¼big exception will be raised, when the you are ill that 51 00:05:05,200 --> 00:05:11,640 is sent by the client is not matched with any of the others, then routing exception will be raised. 52 00:05:11,980 --> 00:05:17,560 And most probably it will generally say in not found, exceptions will be generated. 53 00:05:18,070 --> 00:05:24,430 So this was all the discussion about the request object and it and its attributes. 54 00:05:24,730 --> 00:05:29,710 In the next few days we should see the processing of the form with the help of the post example was 55 00:05:29,800 --> 00:05:30,120 method.