Paging in a Rest Collection

前端 未结 12 1822
走了就别回头了
走了就别回头了 2020-12-02 03:37

I\'m interested in exposing a direct REST interface to collections of JSON documents (think CouchDB or Persevere). The problem I\'m running into is how to handle the G

12条回答
  •  离开以前
    2020-12-02 04:37

    My gut feeling is that the HTTP range extensions aren't designed for your use case, and thus you shouldn't try. A partial response implies 206, and 206 must only be sent if the client asked for it.

    You may want to consider a different approach, such as the one use in Atom (where the representation by design may be partial, and is returned with a status 200, and potentially paging links). See RFC 4287 and RFC 5005.

提交回复
热议问题