7

http 获取某个资源详情的接口是否应该设计多个

 3 years ago
source link: https://www.v2ex.com/t/849306
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

http 获取某个资源详情的接口是否应该设计多个

  wangqifox · 10 小时 27 分钟前 · 878 次点击

在开发过程中遇到这样的问题:某个资源的详情接口(比如 GET /users/{id})需要在两个场景使用:

  1. 资源详情查看
  2. 资源修改前获取资源详情

页面展示时需要的详情信息和资源修改时需要的详情信息不一致,是否应该设计多个详情接口。


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK