资源的数据结构:文章(标题, 作者, 正文)
article(title, author, content)
由于正文内容很大, 不能一开页面就 GET /articles
于是我把article
分割为(header, content)
两部分
当然在数据库中是不变的.
这时用REST我就有疑问了
GET /articles/headers
?
还是GET /articlesHeaders
?
还是GET /articles/?status=header
?
还是其他?
看过网上一些文章关于子资源的
只有类似GET /articles/14/headers
的应用
这明显不是我需要的, 因为来请教一下, 感谢万分~
感觉应该是前一种
或者要不就直接写成/headers呢