----BEGIN CLASS---- [14:00] #startclass [14:00] Roll Call [14:01] Shubham [14:01] aritra [14:01] Kushal [14:01] kiyo [14:01] Shivam Soni [14:01] nagarajan [14:01] Okay, let the others come in. [14:01] lycidas [14:01] Mean while any questions from the first few chapters of the book? [14:02] I wonder how many of you are practising commands on terminal regularly!! [14:02] Who all read through those chapters? Please say yes if you read & practised them, or else say no. [14:03] no, not yet [14:03] I'm not sure, I thought we had curl homework [14:03] no, just the first two chapter [14:03] same, only the first two chapters [14:03] kiyo, correct, but I am asking about the chapters before :) [14:04] no [14:04] so no questions for the first few chapters? [14:04] no [14:04] Then we can move to the next. [14:04] the 3 links with shell commands and the LFS, then yes [14:04] no [14:04] Which is an interesting thing, because we will deal with Network and specifically HTTP today :) [14:05] Who all of you heard about the project called curl? [14:05] me [14:05] me [14:05] https://en.wikipedia.org/wiki/CURL is the wikipedia page for the project. [14:06] me [14:06] me [14:06] Who all used it? [14:06] me [14:06] me [14:06] me [14:06] not used it, but heard of it.... [14:06] me [14:06] In today's session we will learn how to use it. [14:06] But, before that we have a small surprise. [14:07] Everyone please meet bagder. [14:07] bagder is the author of curl :) [14:07] :O [14:07] hello all [14:07] Hej [14:07] :O [14:07] great, hello :) [14:07] hello :O [14:07] me [14:07] I did the first curl release in the spring of 1998 and I am still the lead developer. [14:08] To you all who are new of FOSS world, this is the best part of being in the community, you can meet the real people behind the projects :) [14:08] wow [14:08] I hope you'll enjoy your curl command line and if you think anything is weird or quirky, it probably is =) [14:10] but I'm afraid I need to run off in a few minutes so I will leave you to it in a sec [14:10] bagder has less time today, but the project channel is #curl and you all are welcome to join the channel. [14:10] bagder, Thank you for dropping, I hope we can get a full session from you someday :) [14:10] absolutely, we are always in #curl to help with curl problems and curl issues [14:10] I will be happy to, kushal [14:11] bagder, Thank you once again :) [14:11] have fun! [14:11] ok nice :) thanks for coming bagder [14:11] bye :) [14:11] so coming back to curl. [14:12] It is actually a command line tool called curl, and a library called libcurl [14:13] We will start learning with curl the command. [14:13] You will find it in your system, in your smart phone, in your tv :) [14:14] Open terminal and then try out the commands. [14:14] curl https://kushaldas.in/test.html [14:14] This will fetch the URL mentioned as https://kushaldas.in/test.html [14:14] try it, and tell us if the command worked or if you have any trouble. [14:14] the command worked for me. [14:15] Worked [14:15] it worked fine [14:15] worked [14:15] What you can see as the output is pure HTML. [14:15] command worked and it fetched whole html file [14:15] Browsers render them nicely, but curl is showing you the *source* form :) [14:16] -o helps to download a file with a given name/path. [14:16] curl https://kushaldas.in/test.html -o /tmp/download.html [14:16] try this [14:16] and then try curl -O https://kushaldas.in/test.html [14:16] -O saves the file with the same name from the URL. [14:17] let me know when you tried and if you can understand [14:18] done. [14:18] done [14:18] worked [14:19] done [14:19] done [14:19] done [14:20] With -d we can do POST request, $ curl -d "name=kushal&lang=Python" https://httpbin.org/post [14:21] If you don't know what is POST, it is okay, the book has a link to a video to teach you that :) [14:22] If you pass -v, then you can inspect the HTTP headers, curl -v http://httpbin.org/get [14:22] try both. [14:23] done [14:24] done [14:24] All of these examples are from https://lym.readthedocs.io/en/latest/curl.html [14:24] done [14:24] done [14:25] done [14:25] done [14:26] done [14:26] In the beginning of the chapter, we have a video on HTTP requests https://www.youtube.com/watch?v=iYM2zFP3Zn0 [14:27] Now your goal for today is to practice the commands in the chapter, and also watch the video *right now* [14:27] and ask any question you have here. [14:27] ok [14:27] ok [14:27] Not during session, but afterwards. [14:27] I have to say, I am still surprised at the less number of questions you all have. [14:28] ! [14:28] I will end the session right away, but we will be still online to see if you have any questions. [14:28] next [14:28] why cURL was made in the first place? [14:29] also, difference between curl and wget? [14:29] ari0x, why only badger can answer, you can check for his old talks in youtube. [14:29] ! [14:30] ari0x, for the second question, you will have to learn both the commands, and then you will already know the difference :) [14:30] next [14:30] you mentioned that curl is used in most of the devices? why? and for what purpose? [14:31] ari0x, so you will have to start reading, start from the wikipedia page. [14:32] and the things I just asked above. [14:32] I will end the session. ----END CLASS----