Chapter 2
Web Services
Section 4
Making REST Requests Using urllib
There are several user stories that involve RESTful API clients written in Python. How can we create a Python program that is a client of RESTful web services? Let’s see this. - Import the urllib components that are required - Define the query string that will be used and use the query to build the pieces of the full URL - Build a final Request instance and open a context to process the response