[英]Is it possible to do an API without Endpoint?
我有一个问题是由于工作中的讨论,一个人说是,另一个人说不,正确的答案是什么?
Lets take REST
API's for instance as the example here. 让我们以REST
API为例。
An Endpoint
is an address that you call in order to GET / DELETE / PUT or POST data TO or FROM the service that is providing the API. Endpoint
是您为了向提供API的服务获取/删除/放入或发布数据而调用的地址。
Imagine an Endpoint to be like a phone-number. 想象一个端点就像一个电话号码。
If you call 911
someone will likely answer with "Hey, whats your emergency?" 如果您拨打911
有人可能会回答“嘿,您的紧急情况是什么?”
But if you call 000091100000
the likelihood of someone answering with "Hey, whats your emergency?" 但是,如果您拨打000091100000
,则有人回答“嘿,您的紧急情况是什么?”的可能性000091100000
。 would probably decrease. 可能会减少。
So, an endpoint is usually what you would refer to as the "address" to an API-function. 因此,端点通常就是您所称的API函数的“地址”。
Eg. 例如。 https://api.yourDomain.com/users/get/details/query?age=25 https://api.yourDomain.com/users/get/details/query?age=25
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.