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

So I've got a Referer ... what do I do with it? #167

Open
cbiffle opened this issue Feb 10, 2024 · 2 comments
Open

So I've got a Referer ... what do I do with it? #167

cbiffle opened this issue Feb 10, 2024 · 2 comments

Comments

@cbiffle
Copy link

cbiffle commented Feb 10, 2024

Hi! I'm using this crate in conjunction with axum_extra's TypedHeader extractor, but I can't figure out how to actually get at the extracted value of some of the headers.

Referer is one example. I see how to make one using from_static or the operations on the Header trait... but once I've got one... how do I get the contents back out?

Apologies if I've missed something obvious. Thanks in advance.

@seanmonstar
Copy link
Member

Yea the Referer type isn't that interesting. It's basically just a string, a stronger type isn't too useful.

In general, the types in this crate have been conservative in adding functionality, but can if there's a compelling use case.

@cbiffle
Copy link
Author

cbiffle commented Feb 11, 2024

Well, would "getting the string back out for use with TypedHeader in axum_extra" be a compelling use case? If so I can send a PR.

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

No branches or pull requests

2 participants