O'Reilly logo

Mastering Yii by Charles R. Portwood II

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 9. RESTful APIs

Representational State Transfer (REST) is a modern approach for client-server communications that decouple the client (such as Bowers and mobile applications) from the server components in applications. RESTful implementations enable backend implementations to speak a common language (usually, XML or JSON) while taking complete advantage of HTTP verbs, such as GET, POST, PUT, and DELETE. RESTful applications enable us to build stateless, scalable, and uniform applications that we can distribute to our clients. With Yii2, we can quickly implement RESTful APIs as either a part or the whole of our application.

ActiveController

The simplest way to create RESTful APIs in Yii2 is to take advantage of yii\rest\ActiveController ...

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