Skip to content

Add guidance on support for Prefer header [RFC 7240] #285

@mkistler

Description

@mkistler

RFC 7240 describes the Prefer header which can be used on requests to express the client's preference for handling of a request or the content of the response. In particular, Section 4.2 defines the "return=representation" and "return=minimal" preferences, which allow the client to express their preference for either a full representation or "minimal" (generally a 204 No Content) response body.

From the RFC:

the "return=minimal" preference can reduce the amount of data the server is required to return to the client following a request. This can be particularly useful, for instance, when communicating with limited-bandwidth mobile devices or when the client simply does not require any further information about the result of a request beyond knowing if it was successfully processed.

While the Prefer header is similar in spirit to the "view" parameter defined in AEP-157 Partial Responses, Prefer is intended mainly for mutating operations PUT, POST, and PATCH, whereas the "view" parameter is only defined for Get and List methods.

The AEPs should provide guidance on the Prefer header -- whether it should be supported and in what circumstances. This guidance could be added to AEP-157 or in a newly minted AEP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions