Restful Services

Sraban Pahadasingh    April 14, 2020 05:53 PM

# Why REST

  1. Rest can be fetched from cahced storage instead of always heating to Server
  2. Rest is Stateless.
  3. Rest can work in very low bandwidth
  4. REST request & response can be in TEXT, XML, HTML and JSON Format.
  5. REST is an architectural pattern not a protocal.
  6. REST can make use of SOAP services.
  7. Challenges in Rest - Lack of Security & Lack of state

# Methods:

  1. GET

    • This method is like calling a uri with query parameters.
  2. POST

    • Not idempotent method, used to create records in DB
    • Since record does not exits before, save url and return url is different.
  3. PUT

    • This method is idempotent. means client and server urls are same.
    • Used for updating a resource by using the primary key.
    • This method specifiy to fully update the db record with the variables.
    • When the the url with primary key is not valid, the record is auto generated in database.
  4. PATCH

    • This method is idempotent. means client and server urls are same.
    • Used for updating a resource by using the primary key.
    • This method specifiy to partially update the db record.
    • When the the url with primary key is not valid, the record is auto generated in database.
  5. DELETE
    • This method in REST is used to destroy the resource.
    • Destroyed resource are not called again To DELETE the resource





Comments powered by Disqus