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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.