Consuming HTTP Services in Python Transcripts
Chapter: Initial HTTP GET requests with the requests package
Lecture: Concept: A simple GET with requests

Login or purchase this course to watch this video and the rest of the course contents.
0:01 So that was simple, right, the whole promise of Requests is that it makes doing simple operations simple and easy and straightforward,
0:09 I certainly think that that operation fit the bill. We start by importing Requests, and then we just do get url
0:17 to actually download the response, now this is a blocking call, it's not going to return it's we've actually gone to the server,
0:23 looked up the dns for talkpython.fm done the get, got the response, entirely downloaded it so this is a blocking call, and we have response
0:30 and it has both the status code set so we also have headers and cookies and things like that and we can access the text property,
0:37 so here we are just printing out, here is the first 500 characters that we got, just see what this was all about,
0:43 now this was really cool that we could go do this simple get against the website, but what we want to work with are actually services,
0:49 things that are meant to talk, computer to computer, program to program, not program to humans or program to browser to humans,
0:57 however you want to think about it, so that is what we are going to do next.


Talk Python's Mastodon Michael Kennedy's Mastodon