REST:HTTP 动词和端点的名称是什么? [英] REST: what's the name for the HTTP verb and endpoint?

查看:50
本文介绍了REST:HTTP 动词和端点的名称是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于此:

GET /users

/users 在 REST 术语中称为 endpoint.

/users is called endpoint in REST terminology.

你如何调用整个 GET/users(动词 + 端点)?我希望只有一个词.

How do you call the whole GET /users (verb + endpoint) instead? I hope there is one word for it.

谢谢.

推荐答案

您可能不会喜欢这个答案,但无论如何:REST 根本不使用术语端点".你可以自己查看 Fielding 的论文:http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm - 打开 PDF 并搜索端点".

You probably won't like this answer, but here it is anyway: REST does not use the terminology "endpoint" at all. You can check Fielding's thesis yourself: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm - open the PDF and search for "endpoint".

Fumanchu 的答案可能是您得到的最接近的答案:/Users"是一个相对路径,可以根据 2616 HTTP 规范用作请求行中的请求 URI.

Fumanchu's answer is probably the closest you get: "/Users" is a relative path and can be used as the Request-URI in the Request-Line as per the 2616 HTTP spec.

在 Web API 文档中,我可能会像您一样将/Users"称为端点"引用,而GET/Users"将称为操作".也许你可以在这里得到一些灵感:https://nhs.3scale.net/docs

In a web API documentation I would probably call "/Users" an "Endpoint" reference as you do, and "GET /Users" would be an "Operation". Maybe you can get some inspiration here: https://nhs.3scale.net/docs

这篇关于REST:HTTP 动词和端点的名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆