O'Reilly logo

Hands-On Chatbot Development with Alexa Skills and Amazon Lex by Sam Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required