how to define api code example
Example 1: what is an api
An application program interface (API) is a set of routines, protocols, and
tools for building software applications.
Basically, an API specifies how software components should interact.
Additionally, APIs are used when programming graphical user interface (GUI)
components.
A good API makes it easier to develop a program by providing all the
building blocks. A programmer then puts the blocks together.
Example 2: what is api
It means connectivity.
I mean API is the messenger that takes requests and
tells a system what you want to do and then returns the response back to you
What is JSON? JavaScript Object Notation
It's a key value pair. its popular light-weight way of transferring data
What is Postman is a Client tool to work with APIs
to send requests get response. Organize the requests
Collection in Postman is a top level folder
Header: exists in both request and response,
is metadata about the request. It's a key value pair
Content Type: in request header: to specify what kind of data
we are sending to the server
in response header: what was the contenttype we got as response