3

请教大家一个问题,如何设计 HTTP API 接口?

 2 years ago
source link: https://www.v2ex.com/t/827058
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.

V2EX  ›  程序员

请教大家一个问题,如何设计 HTTP API 接口?

  yongchiu · 21 小时 21 分钟前 · 960 次点击

现在做开发的时候遇到一个问题,需要将以前三个接口完成的功能整合到一个功能里来,对于 POST 类的请求可以整合到 body 里,里面是由多个 JSON 组成的一个大 JSON 数据,这样做主要是参考 Google 的做法。 对于 GET 类的请求应该如何设计呢,GET 请求一般不用 body ,怎么用一个比较好的方式把三个接口的参数整合到一起?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK