Rest API

  • representational state transfer or REST API mainly used for help apps to interact with web services.
  • rest API's URL has two components,
    • base URL - this is the root of the API. we can interact with API using this URL
    • endpoint - use to access different resources of the API

Request method

  • telling the API how you want to interact with it. this can be broken down to following components
    • GET - fetch data from a service
    • POST - send data to an API
    • PUT - update the data in an API in a single call. in this way you don't need the get data , change it and post it. everything can be done in a single call
    • DELETE - delete the data

Status Code

  • when you posting or updating the data you. need to know if all the things has been worked fine or are you success of doing it. for identified that we are using status codes.