http api vs rest api code example

Example 1: rest api means

Let's break it into two components:

1) RESTful
2) API
An API is an interface through which one program or web site talks to another.
They are used to share data and services, and they come in many different
formats and types.

A RESTful API is one of the many possible ways that programs, servers, 
and web sites can share data and services. REST (Representational State Transfer
) describes the general rules for how the data and services are represented 
through the API so that other programs will be able to correctly request and 
receive the data and services that an API makes available

Example 2: api vs web services

--All Web services are APIs but not all
APIs are Web services.
--Web services might not contain all
the specifications and cannot perform
all the tasks that APIs would perform.
--A Web service uses only three styles 
of use: SOAP, REST and XML-RPC for
communication whereas API may be exposed 
to in multiple ways.
--A Web service always needs a network
to operate while APIs don’t need
a network for operation.

Tags:

Misc Example