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

Feature request: Allow adding headers to WebpageOptions #15

Closed
thesurlydev opened this issue Aug 16, 2023 · 3 comments · Fixed by #16
Closed

Feature request: Allow adding headers to WebpageOptions #15

thesurlydev opened this issue Aug 16, 2023 · 3 comments · Fixed by #16

Comments

@thesurlydev
Copy link
Contributor

In some instances, it's desirable to add custom request headers. Please consider adding headers to the WebpageOptions struct which can then be passed to the Easy handle in HTTP::fetch

@orottier
Copy link
Owner

Apologies for the delay in response. I agree this is definitely a useful feature.

Adding a new field to the all-pub WebpageOptions is a breaking change unfortunately, but I don't mind moving to a v2 version.
To avoid further backward incompatible additions to the struct we should probably mark it with #[non_exhaustive].

Is this something you would be willing to draft a PR for? I could do it myself but maintenance of this crate is not my top priority to it might take a while.

@thesurlydev
Copy link
Contributor Author

Sure, I can take a stab at it.

@orottier
Copy link
Owner

orottier commented Sep 4, 2023

Thanks for the work on this one.
I have just released v2.0.0-alpha.1 so you can use this in your projects.
I'm considering some other breaking changes before I release the official v2

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 a pull request may close this issue.

2 participants