Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RFC 006: Format Negotiation Protocol #115

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/rfc/006-format-negotiation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ header.
Servers that do not support the request format respond with HTTP status code `415 Unsupported Media Type`. Otherwise, if
the server does support the request format, it uses the most-preferred (as per `Accept` request header) format to encode
the response and advertise the chosen format in the response `Content-Type` header. Upon receiving a `415` response,
clients may choose to repeat the request encoded with a more widely supported (i.e., typically older) format.
clients may choose to repeat the request encoded with a different (i.e., typically older) format.

**Binary data** Conjure supports endpoints accepting `binary` request parameters or returning `binary` responses. In
accordance with the wire spec, a request carrying binary data in the request body must include a `Content-Type:
Expand All @@ -73,7 +73,9 @@ is not versioned.
protocols based on their preference and let the server merely "chooses" based on its support for the most preferred
formats. Further, clients are in control of the trade-off between choosing the newest or most preferred versus an older
or more widely supported format. The former approach unlocks new formats and features more quickly, but may result in an
additional round-trip when the client has to reissue the request encoded with a more widely supported format.
additional round-trip when the client has to reissue the request encoded with a different und hopefully supported

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*and

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving to munich has already corrupted my typing ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

format. A more complex negotiation mechanism (e.g., based on OPTIONS endpoints or `Accept-Post` response headers) is
possible, but outside the scope of this RFC.

**OPTIONS.** This RFC does not propose to make the set of server-supported formats available as through an OPTIONS
request. A client receiving a `415` error from a server can instead retry the request with the maximal list of
Expand Down