Also referred to as “verbs” for web language
1xx - Informational (100-continue ; 102-processing)
2xx - Success (200-OK; 201-Created; 204-NC)
3xx - Redirection (301-Moved; 302-Found;...)
4xx - Client Error (400-bad request; 401-unauthorized..)
https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#/media/File:Http_request_telnet_ubuntu.png
The process by which the client determines the representation of the resource
Can be done through HTTP header
http://localhost:8080/restService/person.json
Takes precedence over accept ...
Representational State Transfer
REST is an architectural style, a way to design web-services (WS) or web-api
Resources - sources of information
Complex when your data is a graph (linked entities)
Rebuilding graph on client by doing multiple requests
Chrome
Firefox
curl https://apps.dhis2.org/demo/api/dataSets.json -u admin:district -v
curl -H "Content-Type: application/json" -X PATCH -d '{"code":"IN_394130"}' \
http://localhost:8080/dhis/api/indicators/tcs5YGnjiKo.json -u admin:district -v
curl -H "Content-Type: application/json" -X PATCH -d @data.json \
http://localhost:8080/dhis/api/indicators/tcs5YGnjiKo.json -u admin:district -v