Representational State Transfer

REST is a paradigma for data transfer between client and server. It’s using the verbs GET, POST, PUT, DELETE (and some others) from the HTTP-protokoll,
hence there is almost everywhere a solid infrastructure. For Machine-2-Machine communication REST is a smart choice.

REST deals with resources uniquely identified by URL’s. For Example: could be a user ressource with 5 as an user id. By requesting this resource via different types of HTTP verbs typical CRUD (create, read, update, delete) actions can be performed on the ressource.

I will show some very simple ways how to get startet with REST.

Imagine you would call a REST service with curl from the commandline like this (thats a GET request):

or with a POST request:

The responding server-side could look somewhat like this.
We deal here with pseude-code. Depending on the framework you use, it differs how to access parameters passed alongside the request.


Veröffentlicht unter REST.