-
Notifications
You must be signed in to change notification settings - Fork 89
Expose the Accept header #51
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR! The |
src/common/accept.rs
Outdated
/// ); | ||
/// ``` | ||
#[derive(Debug, PartialEq, Eq)] | ||
pub struct Accept(pub Vec<QualityValue<Mime>>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This crate has tried to be very conservative in what details it exposes, to try to allow the internal representations to change without it being a breaking change. So at the very least, I'd keep the fields private.
@@ -33,21 +32,18 @@ impl Default for Quality { | |||
|
|||
/// Represents an item with a quality value as defined in | |||
/// [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.1). | |||
#[derive(Clone, PartialEq, Debug)] | |||
#[derive(Clone, PartialEq, Eq, Debug)] | |||
pub struct QualityValue<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've felt for a while now that the QualityValue
design is kind of annoying to use, but I've never sat down to come up with a better one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't say I have any better idea. The API looks ok to me, at least there isn't anything that should be clearly removed
Is there anything blocking this PR from getting merged? |
bumping interest in this PR, or at least interest in having the accept header available |
Enables
Accept
without any deeper changes and exposes the internalMethod
ofAccessControlRequestMethod
. Probably a better way of doing this PR but this adds the features I need to migrate from https://github.com/dekellum/hyperx