-: In the previous section
we discussed various types of APIs
and we concluded that Web APIs is the most popular
and most useful kind of API.
So let's dive a little bit deeper into Web APIs
and explain what it is exactly.
So, let's remind ourselves
the definition of Web API that we have used.
An API exposed by a web component,
allowing other component to interact with it.
It's important to remember
some common characteristics of Web API.
First, Web API is platform agnostic
meaning .NET components, for example,
can easily communicate with Python component using Web API.
And of course this is true also for other platforms.
In addition, Web APIs use standard protocols
usually over HTTP as you see in this diagram.
And also Web API usually using request/response
meaning when we have a core component,
in this case the .NET component,
which is calling the Python component,
then the .NET component will request or will send a request
based on the HTTP protocol to the Python component
and we'll receive back an HTTP response.
This is part of the HTTP protocol,
and almost all kinds of Web APIs
will use this paradigm of request response.
Now, when discussing Web API types
we should understand what is the difference
or what is the main differences between them.
So the Web APIs are differentiated
mainly by the request format.
It could be JSON or XML or anything else.
The request content.
What is the content of the request
that is sent over the web?
The response format.
Again, is JSON or XML or Clear text or something else.
And of course the response contents.
What is the content of the response
sent by the server back to the client.
So with that in mind,
let's explore the various types of Web APIs.
First, SOAP,
and REST, GraphQL and gRPC.