Skip to content

Clarify interaction of get-with-body with pagination #840

Open
@ePaul

Description

@ePaul

The "Note" at the end of the Get with body section of MUST use HTTP methods correctly [148] says:

Hint: As GET with body is used to transport extensive query parameters, the cursor cannot any longer be used to encode the query filters in case of cursor-based pagination. As a consequence, it is best practice to transport the query filters in the body payload, while using pagination links containing the cursor that is only encoding the page position and direction. To protect the pagination sequence the cursor may contain a hash over all applied query filters (See also SHOULD use pagination links).

On the other hand, the SHOULD use pagination links rule has no mention of get-with-body, and when missing this hint, it's not immediately clear how this should work together.

One potential interpretation might be that the "get with body" POST creates a filtered view on the server, and the returned pointer URLs might directly work as GET (pointing to this filtered view). This is not a best practice (as it stores client session state on the server), instead it should be made clear that those URLs are meant to be used together with the body containing the filter parameters (the same one as in the original query, and the one in the query property of the response page).

I suggest adjusting rules 161 and 284 for making this clearer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions