【发布时间】:2018-04-24 22:00:58
【问题描述】:
JSON-API provides a way to fetch 资源集合或单个资源。
您可以获取单个资源并指定包含如下关系:
GET /articles/1?includes=author
是否有可能 - 根据规范 - 在一个请求中获得三篇特定的文章?
而不是:
GET /articles/1?includes=author
GET /articles/42?includes=author
GET /articles/67?includes=author
例如(这是为了说明目的而编造的):
GET /articles/1,42,67?includes=author
【问题讨论】:
-
请注意,指定包含相关资源的查询参数应为
include而不是includesaccording to spec。
标签: json-api