8000 Add a Header extractor for header parameters by ahl · Pull Request #1325 · oxidecomputer/dropshot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a Header extractor for header parameters #1325

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

Merged
merged 2 commits into from
May 16, 2025
Merged

Add a Header extractor for header parameters #1325

merged 2 commits into from
May 16, 2025

Conversation

ahl
Copy link
Collaborator
@ahl ahl commented May 15, 2025

I think from_map could be updated to be more elegant (it's basically the first Rust I ever wrote), but I think this will be fine in the meantime (and probably much longer).

Copy link
Contributor
@smklein smklein left a comment

Choose a reason for hiding this comment

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

Makes sense to me, and the example is readable! Happy to use this.


use super::{metadata::get_metadata, ExtractorMetadata, SharedExtractor};

pub struct Header<HeaderType: DeserializeOwned + JsonSchema + Send + Sync> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is part of the public-facing API; it might be worth documenting (or including a small example)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point; thanks

@ahl ahl merged commit b9b0a11 into main May 16, 2025
11 checks passed
@ahl ahl deleted the header-params branch May 16, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0