怎么设计一个restful的url,表示:某个用户评价另一个用户

这个url要能表示: 某个用户评价另一个用户

目前我的想法是: POST /users/123/comments/users/456 不知是否还有更好的

已邀请:

nil

赞同来自: fangniu yet luw2007 tsingson gosky nove001 haohongfan更多 »

POST /users/123/comments

Body {users:456,comments:"comment content"}

marks_gui

赞同来自: gog ioco

本来就半个小时的问题,想个 api路由规则都要几个小时。记得之前看过的文章告诫:不要为了 restful 而 restful!

iron_js

赞同来自:

POST v1/comments Body { "creator":123, "target":456, "content":"comment content" }

jhuly1234

赞同来自:

It will be great pleasure when you download the wonderful new whatsapp here https://downloadstatus.xyz/category/sad/ status. I'm sure you will get more and more likes

fwhezfwhez

赞同来自:

  1. 增加评论 POST /user/comment/
    {
    "commenter": "Li Hua",
    "commentee": "ZhangLei"
    "message": "说得对",
    ...
    }
  2. 获取评论 GET /user/comment/?commenter_id=1&commentee_id=3&topic_id=12

Munna123

赞同来自:

Nice post visit here to know more about windows 10 operating system. download windows 10 This is an awesome post for the user of windows 10 operating system. So visit here and know the complete information of windows 10 operating system.

goalken

赞同来自:

信息非常特别,我必须跟着你,你带来的信息是非常真实的,正确而客观地反映出来,对社会共同成长非常有用。 run 3 online

lesliehuang

赞同来自:

重庆时时彩幸运飞艇北京pk10 辛苦分享,支持下!

要回复问题请先登录注册