REST API Architectural Constraints:
A Restful system consists of a:
- client who requests for the resources.
- server who has the resources.
Architectural Constraints of RESTful API:
- Uniform Interface
- Stateless
- Cacheable
- Client-Server
- Layered System
- Code on Demand
RESTfull = REST over HTTP
GET | 200 OK | 404 Not Found |
POST | 201 Created | 404 Not Found
401 Unauthoriized 409 Conflict |
PUT PATCH |
200 OK | 404 Not Found
401 Unauthoriized 405 Method Not Allowed |
DELETE | 200 OK | 404 Not Found 401 Unauthoriized |
OPTIONS | 200 OK | |
HEAD | 200 OK | 404 Not Found |
Response code:
1xx Information
2xx Success
3xx Redirect
4xx Client error
400 - Bad request
401 - Unauthorized
403 - Forbidden
404 - Not found
405 - Method not allowed
5xx Server error
https://restcountries.com/#endpoints-all