O'Reilly logo

Play Framework Cookbook - Second Edition by Giancarlo Inductivo, Alexander Reelsen

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

Chapter 4. Creating and Using Web APIs

In this chapter, we will cover the following recipes:

  • Creating a POST API endpoint
  • Creating a GET API endpoint
  • Creating a PUT API endpoint
  • Creating a DELETE API endpoint
  • Securing API endpoints with HTTP basic authentication
  • Consuming external web APIs
  • Using the Twitter API with OAuth

Introduction

In this chapter, we will look into creating REST APIs and interfacing with other external web-based APIs, in our case, the Twitter API.

With the increasing popularity of data exchanges between independent web services, REST APIs have become a popular approach not only to consume external data, but also to receive incoming data for further processing and persistence as well as exposing data to authorized clients. Based on the ...

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