What is Rest API?

  1. Client-Server Architecture- this indicates that the client and the server are separate from each other and must be able to function independently.
  2. Uniform Interface- the structure of the call and response must be uniform across all REST APIs.
  3. Stateless- This means the server will not store a history of previous calls made to the server. Each call will be considered new.
  4. Cacheable- all responses must be cacheable.
  5. Layered System- It is possible to have many servers. The client should not be able to tell if it is connected to the end server or an intermediary server.
  6. Code on demand (optional)- the server may return executable code to the client.
  1. POST: Create user information on the server.
  2. GET: Get user information on the server.
  3. PUT: Update and Replace the user information on the server.
  4. DELETE: Delete the user information on the server.
  1. Accept Header:The Accept header describes which format you want a response. For example, responses can be delivered either as XML or JSON .
  2. Content-Type:The content-Type describes the format the body of your request . For example, the body of your requests can be sent as JSON or XML, but you need to declare in the Content-Type header which one is being used.
  3. Cookie:The Cookie contains the authenticated session ID that you obtained after creating a REST API session.



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store