sagebind / isahc

The practical HTTP client that is fun to use.
https://docs.rs/isahc
MIT License
711 stars 62 forks source link

Refactor TLS API #388

Open sagebind opened 2 years ago

sagebind commented 2 years ago

Refactor the API for SSL/TLS configuration. This accounts for the fact that the TLS engine can vary (as rustls is now an option) and corrects some confusing parts of the API that don't always make sense.

codecov[bot] commented 2 years ago

Codecov Report

Base: 52.99% // Head: 52.42% // Decreases project coverage by -0.56% :warning:

Coverage data is based on head (c39f6f8) compared to base (096aff7). Patch coverage: 28.15% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #388 +/- ## ========================================== - Coverage 52.99% 52.42% -0.57% ========================================== Files 56 59 +3 Lines 5831 5951 +120 ========================================== + Hits 3090 3120 +30 - Misses 2741 2831 +90 ``` | [Impacted Files](https://codecov.io/gh/sagebind/isahc/pull/388?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley) | Coverage Δ | | |---|---|---| | [src/auth.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2F1dGgucnM=) | `76.66% <0.00%> (ø)` | | | [src/config/proxy.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2NvbmZpZy9wcm94eS5ycw==) | `100.00% <ø> (ø)` | | | [src/error.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2Vycm9yLnJz) | `44.68% <0.00%> (+0.18%)` | :arrow_up: | | [tests/tls.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-dGVzdHMvdGxzLnJz) | `0.00% <0.00%> (ø)` | | | [src/tls/identity.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL3Rscy9pZGVudGl0eS5ycw==) | `11.53% <11.53%> (ø)` | | | [src/tls/roots.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL3Rscy9yb290cy5ycw==) | `22.53% <22.53%> (ø)` | | | [src/tls/mod.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL3Rscy9tb2QucnM=) | `35.92% <35.92%> (ø)` | | | [src/config/mod.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2NvbmZpZy9tb2QucnM=) | `69.33% <45.45%> (-4.50%)` | :arrow_down: | | [src/config/request.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2NvbmZpZy9yZXF1ZXN0LnJz) | `71.05% <50.00%> (-2.56%)` | :arrow_down: | | [src/lib.rs](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley#diff-c3JjL2xpYi5ycw==) | `17.83% <50.00%> (+0.45%)` | :arrow_up: | | ... and [8 more](https://codecov.io/gh/sagebind/isahc/pull/388/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stephen+M.+Coakley)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.