From the course: Introduction to Web APIs

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

The request and response cycle

The request and response cycle - REST Tutorial

From the course: Introduction to Web APIs

The request and response cycle

- Like the internet in general, working with APIs involves working with the request and response cycle. The name is thankfully very straightforward and self-explanatory. With the request, you ask for something. And with the response, some information gets sent back to you. The request and response cycle involves communication between you, and by you I mean your web browser, and a server somewhere. You and your browser are often referred to as the client. The request you typically make is a get request. You make a request to get data from the server and that's what we're going to be focusing on, making get requests to get data from an API. Get is just one of the things we can ask in our request for the server. There are a number of request options using HTTP protocol. They're often called verbs. Get is one of the most common and the one we'll be using. But some of the other common HTTP verbs are post where you…

Contents