知识卡片

普通读书笔记卡 · 10370 · 生成模型:GPT-6

REST资源与操作

理解等级:中级

资源是客户端要访问的业务对象,例如一名用户。URI 标识资源,方法表达读取、创建、替换等操作。HTTP 是这些交换的通信协议,REST 还要求交互按约束组织;路径有名词这一点不足以判断整套接口的风格。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第01章《Introducing APIs and OpenAPI》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch01.htm,阅读块 68) - 结论依据:原文以 /users/123 说明 URI 标识一项资源并用 HTTP 方法操作。 - 原始内容:One of the key ideas behind REST is that of a resource. Things such as user accounts, billing reminders, or even the weather in San Francisco are all resources, and each resource is identified by a URI. For a user’s account, we