Making an API request

Making a request to an API consists of using a GET, PUT, POST, or DELETE method on a URL with some optional data. A well-designed API will be designed to have most of the information about the request in the URL. This means that we will be changing the URL based on the user choices.

For the Open Weather Maps API, the URLs that we need to send our requests to are structured as follows:

Unfortunately, the API needs us to define a country code. In this example, we should use US, as we selected US_CITY as our slot type. If you chose a different slot type, ...

Get Hands-On Chatbot Development with Alexa Skills and Amazon Lex now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.