ZhangZhihui's Blog  

Method  URL Pattern  Action

GET  /v1/healthcheck  Show application health and version information
GET  /v1/movies  Show the details of all movies
POST  /v1/movies  Create a new movie
GET  /v1/movies/:id  Show the details of a specific movie
PATCH  /v1/movies/:id  Update the details of a specific movie
DELETE  /v1/movies/:id  Delete a specific movie
POST  /v1/users  Register a new user
PUT  /v1/users/activated  Activate a specific user
PUT  /v1/users/password  Update the password for a specific user
POST  /v1/tokens/authentication  Generate a new authentication token
POST  /v1/tokens/password-reset  Generate a new password-reset token
GET  /debug/vars  Display application metrics

 

Method     Usage
GET          Use for actions that retrieve information only and don’t change the state of your application or any data.
POST       Use for non-idempotent actions that modify state. In the context of a REST API, POST is generally used for actions that create a new resource.
PUT         Use for idempotent actions that modify the state of a resource at a specific URL. In the context of a REST API, PUT is generally used for actions that replace or update an existing resource.
PATCH     Use for actions that partially update a resource at a specific URL. It’s OK for the action to be either idempotent or non-idempotent.
DELETE  Use for actions that delete a resource at a specific URL.

posted on   ZhangZhihuiAAA  阅读(2)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2023-11-14 Protobuf - Protocol Buffer Compiler
2023-11-14 Protobuf - FIELD NUMBERS
 
点击右上角即可分享
微信分享提示