-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support for custom HTTP Headers #53
Conversation
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.
Looking good! Thank you for your contribution 👍
Only one minor thing I would like you to change regarding the version number.
Also, for some reason the formatting of the PR seems off and causes cargo fmt
to complain. Are you using Rust nightly?
Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "trauma" | |||
version = "2.1.1" | |||
version = "2.2.0" |
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.
Don't update the version number. We change it when we cut a new release.
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 am using rust stable. (rustc 1.66.1 (90743e729 2023-01-10))
The format is mainly related to rustfmt.
"rust-analyzer.rustfmt.extraArgs": [
"--config",
"max_width=85,single_line_if_else_max_width=80,chain_width=32,format_code_in_doc_comments=false,imports_granularity=Crate"
],
"rust-analyzer.checkOnSave.command": "clippy",
Could you provide the relevant configuration?
Ok, It has been reformatted according to the default configuration, rather than using the above configuration.
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.
👍
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.
👍
Pull Request
Types of changes
Description
close #52
About feature:
Added
.headers()
and.header()
forDownloaderBuilder
.We can either call the
.header()
multiple times to add multiple headers, or we can add a bunch ofheaders
with.headers()
.About dependencies:
http::header
->reqwest::header
url::Url
->reqwest::Url
Reducing external dependencies makes maintenance easier, as well as reducing the probability of dependency conflicts.
Checklist