API 端点语义

编程入门 行业动态 更新时间:2024-10-26 04:20:15
本文介绍了API 端点语义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

API 端点是方法",例如 https://api.foursquare/v2/venues/ 或包含非查询字符串参数的完整 URL,例如 https://api.foursquare/v2/venues/5104

Is an API endpoint the 'method', like https://api.foursquare/v2/venues/ or the full URL including non-query-string parameters like https://api.foursquare/v2/venues/5104

换句话说,这两个独立的端点是相同的端点还是被视为同一个端点?http://myapi/somemodel/1
http://myapi/somemodel/2

In other words, are these two separate endpoints or considered the same endpoint? http://myapi/somemodel/1
http://myapi/somemodel/2

推荐答案

根据 this Wikipedia article,端点是一个 Web 服务,由 WSDL 文件定义,并且

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 在各种上下文中,但它们都等同于同一件事:端点是整个接口,不是一种特定的方法.

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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-18 03:29:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/928432.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:语义   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!