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 2024-11-14 08:52  ZhangZhihuiAAA  阅读(8)  评论(0)    收藏  举报