当前位置:网站首页>Web API Introduction and Types
Web API Introduction and Types
2022-08-01 00:02:00 【HUAWEI CLOUD】
Introduction to Web API
If you're a beginner, even the thought of APIs is a little scary.What kind of dark magic is that?And why everyone pays API developers hundreds of thousands.Do they drink blood and offer sacrifices around the flock in the moonlight?
Soon, when those cool kids claim to be inventing calculus, you're out of the loop and feel like Andy below.If you identify with it, you are lucky.We're talking about APIs.
What is an API?
API is short for Aapplication Programming Interface, but no one calls it that, any more than no one calls USB Universal Serial Bridge.The technical meaning of an API is that it is a set of definitions and protocols for building, communicating, and integrating application software, hence the name "interface".
But technical jargon aside, an API is just a way to interact with an application and its inner workings are invisible to external users.APIs allow external users (clients) to "request" something from an application or server and get a corresponding "response".
In fact, you're already using the equivalent of a real-world API.For example, take an old-fashioned taxi.To get a taxi, you will need:
“Request”: Request a taxi to pick you up with your contact and location information
"Response": In the "Response" to your request, you will get the details of the taxi and the taxi will come and pick you up.You again "request" ( "Request" ) the taxi driver to take you to a specific location.In "Response" ("Response"), the taxi driver takes you to the place you want.
Now you don't need to know how to operate a car to get from one place to another, taxi drivers are like an API.You may know nothing about the operation of the car, but you can interact with the API layer, which is the driver, and navigate to the results you want.
Another way to look at an API is that it's a magic box that takes input in a very specific format and gives output in a very specific format.This "normalization" of input and output (I/O) is useful in application development, making it easy for developers to interact with systems they do not control.
Type of API
If you've heard the term API, chances are it's used to refer to a very specific type of API called Web API.In general, however, the term API may have other meanings depending on the purpose of the API.
According to the purpose, APIs can be roughly divided into the following four categories:
- Web APIs are used to communicate between servers and clients over the Internet.Web APIs, as the name suggests, are a very specific type of API for interacting and manipulating information or resources on the Internet.
- Remote APIs define interaction standards for applications running on different machines.For example, connect a database to a program's JDBC connection API.
- Libraries and frameworks serve as interfaces to software and are also a type of API.
- The operating system can specify APIs for applications to interact with the device.For example, an Android device with a camera needs an OS API to enable any application to control the camera.
边栏推荐
- PHP三元(三目)运算符
- [1161. The maximum sum of elements in the layer]
- Drawing process of hand-drawn map of scenic spots
- WindowInsetsControllerCompat简单使用
- Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
- IPD process terminology
- @JsonFormat(pattern="yyyy-MM-dd") time difference problem
- Thinking and Implementation of Object Cache Service
- /etc/resolv.conf的作用
- SQL injection Less38 (stack injection)
猜你喜欢

(26)Blender源码分析之顶层菜单的关于菜单

Shell常用脚本:Nexus批量上传本地仓库增强版脚本(强烈推荐)

(26) About menu of the top menu of Blender source code analysis

Flink 1.13(八)CDC

消息队列消息存储设计(架构实战营 模块八作业)

Interview assault 69: TCP reliable?Why is that?

Shell common scripts: Nexus batch upload local warehouse enhanced version script (strongly recommended)

One line of code to solve CoreData managed object properties change in SwiftUI problem of animation effects

Recommendation system: Summary of common evaluation indicators [accuracy rate, precision rate, recall rate, hit rate, (normalized depreciation cumulative gain) NDCG, mean reciprocal ranking (MRR), ROC

C# Rectangle基本用法和图片切割
随机推荐
信奥学习规划 信息学竞赛之路(2022.07.31)
vim的基本使用概念
SQL注入 Less38(堆叠注入)
新产品如何进行网络推广?
Shell常用脚本:Nexus批量上传本地仓库脚本
Shell常用脚本:Nexus批量上传本地仓库增强版脚本(强烈推荐)
编程语言是什么
22年8月推广大使额外奖励规则
2022-07-31:给出一个有n个点,m条有向边的图, 你可以施展魔法,把有向边,变成无向边, 比如A到B的有向边,权重为7。施展魔法之后,A和B通过该边到达彼此的代价都是7。 求,允许施展一次魔法
UOS统信系统 - WindTerm使用
开源好用的 流程图绘制工具 drawio
逐步手撕轮播图3(保姆级教程)
无状态与有状态的区别
When can I use PushGateway
SQL注入 Less54(限制次数的SQL注入+union注入)
vector的基本实现
Flink 1.13(八)CDC
Flutter教程之 01配置环境并运行demo程序 (教程含源码)
[Cloud Residency Co-Creation] [HCSD Big Celebrity Live Broadcast] Personally teach the secrets of interviews in big factories
(26)Blender源码分析之顶层菜单的关于菜单