Search⌘ K
AI Features

Working with Web APIs

Explore how to interface with web APIs through the command-line using cURL and json-server. Learn to send GET, POST, and DELETE requests, manage JSON data, and test APIs in a simulated environment for practical experience.

We'll cover the following...

An API, or Application Programming Interface, lets developers interface with An API, or Application Programming Interface, lets developers interface with data without accessing the data directly. Web APIs let us do this by making requests to servers. APIs can let us see current weather conditions, stock prices, sports scores, social media feeds, and pretty much any data we’re looking to consume.

If we’re writing software that interfaces with a third-party web API, or if we’re developing our own, we can use cURL to explore and test that API. We can set headers, define request types, and send data payloads.

To explore this, we need an API we can work with. Instead of using a live API for testing, we use json-server, a Node.js package that provides an API for these types of situations. Let’s set it up inside of the Ubuntu ...