Open
Description
Several headers that a client can send include a list of "quality items", thereby ranking which sorts of representations are more preferable. For example, Accept: image/svg+xml, image/*;q=0.8
. These are often used as part of "Content Negotiation". The API design in this library for these headers should be reconsidered here.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
eggyal commentedon Apr 29, 2020
Given that there is already some degree of implementation for this in
src/disabled
(and taking note of #67 (comment) together with related commit a514a37), what is the thinking for moving this (also #53) forward from here?eggyal commentedon Apr 30, 2020
In terms of external API, perhaps expose a trait:
Which might have a generic implementation along the following lines:
Which would enable the relevant header types to be defined like this, without exposing the internal implementation:
For headers whose items might carry additional data, such as
Accept
(which can include "extension parameters" after the quality-value), one could expose and implement additional traits:Do you think this would be broadly okay, @seanmonstar? If so, I'm happy to work it up and submit a PR.
ParkMyCar commentedon May 3, 2020
#70 adds a QualityValue type, it could totally be reworked if necessary, and open to comments on it 🙂