API端点语义 [英] API Endpoint Semantics
问题描述
API端点是方法",例如 https://api.foursquare.com/v2/venues/或完整的URL,包括非查询字符串参数,例如 https://api.foursquare.com/v2/venues/5104
Is an API endpoint the 'method', like https://api.foursquare.com/v2/venues/ or the full URL including non-query-string parameters like https://api.foursquare.com/v2/venues/5104
换句话说,这两个单独的端点是相同的端点还是被视为相同的端点?
http://myapi.com/somemodel/1
http://myapi.com/somemodel/2
In other words, are these two separate endpoints or considered the same endpoint?
http://myapi.com/somemodel/1
http://myapi.com/somemodel/2
推荐答案
According to this Wikipedia article, the endpoint is a web service, defined by a WSDL file, and
无非是定义了 网络的地址或连接点 服务.通常代表 通过一个简单的HTTP URL字符串.
does nothing more than define the address or connection point to a web service. It is typically represented by a simple HTTP URL string.
Microsoft 在各种情况下使用术语endpoint
上下文,但它们都是同一件事:端点是 entire接口,而不是一种特定的方法.
Microsoft uses the term endpoint
in various contexts, but they all amount to the same thing: the endpoint is the entire interface, not one particular method.
在 REST 端点的上下文中,该端点将包含必需的GET,PUT, POST和DELETE方法(如果适用).
In the context of a REST endpoint, the endpoint would contain the requisite GET, PUT, POST and DELETE methods (as applicable).
这篇关于API端点语义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!