what is resource in rest api code example

Example 1: what is resource in rest api

REST architecture treats any content 
as a resource, which can be either
text files, HTML pages, images, videos
or dynamic business information.
REST Server gives access to resources
and modifies them, where each resource
is identified by URIs/ global IDs.

Example 2: how to represent resource in rest

REST uses different representations 
to define a resource like plain text,
CSV, HTML, JSON, and XML.XML and JSON
are the most popular representations of resources.

Example 3: how to represent a resource in api

We are using http methods like
get,put,post,patch

REST uses different representations 
to define a resource like plain text,
CSV, HTML, JSON, and XML. XML and JSON
are the most popular representations of resources.

Tags:

Php Example