Learning Python Network Programming
HTTP and Working with the Web There is a caveat for path encoding. If the elements of a path themselves contain slashes, then we ...
Chapter 2 HTTP methods So far, we've been using requests for asking servers to send web resources to us, but HTTP provides more ...
HTTP and Working with the Web Let's look at an example for sending some HTML form data to a server by using a POST request, just ...
Chapter 2 We get these by visiting the web page containing the form we would submit to get the results manually. We then inspect ...
HTTP and Working with the Web The source code will pop up in a section of the window. In the preceding screenshot, it's at the b ...
Chapter 2 The standard method for encrypting HTTP traffic is called HTTP Secure, or HTTPS. It uses an encryption mechanism calle ...
HTTP and Working with the Web And we can look at properties of the response object. Try: response.status_code 200 response.re ...
Chapter 2 But Requests also performs automatic decoding for us. To get the decoded content, do this: response.text '<!D ...
HTTP and Working with the Web The Session object has the same interface as the requests module, so we use its get() method in th ...
Chapter 2 Handling errors with Requests Errors in Requests are handled slightly differently from how they are handled with urlli ...
HTTP and Working with the Web Summary We looked at the principles of the HTTP protocol. We saw how to perform numerous fundament ...
APIs in Action When we talk about APIs in relation to Python, we usually refer to the classes and the functions that a module pr ...
APIs in Action Getting started with XML The Extensible Markup Language (XML) is a way of representing hierarchical data in a sta ...
Chapter 3 For now, we're going to focus on the object-based approach by using a Python XML API called ElementTree. The second so ...
APIs in Action Let's add another element, and this time let's give it some content. Add the following commands: name = ET.Sub ...
Chapter 3 These are not the easiest lines of code at first glance, so let's break them down. The minidom library can't directly ...
APIs in Action By now, you should be able to fully recreate the example document shown at the beginning of this section. Go ahea ...
Chapter 3 If you want to read more about this topic, Roy Fielding's dissertation is available here http://ics.uci.edu/~fielding/ ...
APIs in Action The AWS signature generation process is currently on its 4th version, and an involved discussion would be needed ...
Chapter 3 Finally, click on the Attach Policy button at the bottom right-hand side when it appears. Now, our user has full acces ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf