Notes from SpringREST book
API stands for Application Programming Interface. API allows two apps to communicate. SOAP and JSON are the two API responses.
JSON is used to send data back and forth from the client to and from the server. It stands for JavaScript Object Notation. It integrates easily with most languages. JSON Types:-String-Numbers-Boolean-Null-Arrays-Objects
JSON is often used with AJAX
REST stands for REpresentational State Transfer.
REST 6 principles:
-Client Server
-Stateless
-Layered System
-Cache
-Uniform Interface
-Code on Demand
The Uniform Interface constraint is a key feature that distinguishes REST app from other network-based applications.
Understanding Reasources Anything that can be accessed or manipulates. Examples are videos, blog entries, user profiles, images or tagible things like person or device.
Resources can be grouped into collections
HTTP Methods-The four most commonly used methods are GET,POST, PUT,DELETE
The term HTTP verb is also used interchangeably
GET methods are considered to be safe and idempotent
PUT method allows the client to modify a resource state. Client modific the state of a resourse and send the updated rep to the server using a PUT method.