Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve the consistency and functionality of the HTTP context configuration across different browser impersonations. The most significant changes involve refactoring function names and parameters to enhance clarity and maintainability.
Refactoring for improved clarity and consistency:
src/imp/chrome.rs
,src/imp/firefox.rs
,src/imp/okhttp.rs
,src/imp/safari.rs
: Renamed the functionhttp_config
tohttp_context
and updated the function parameters to useImpersonateOption
instead of individual parameters forskip_http2
andskip_headers
. [1] [2] [3] [4] [5]src/imp/macros.rs
: Updated theimpersonate_match
macro to use the newImpersonateOption
parameter instead of separate parameters foros
,skip_http2
, andskip_headers
.src/imp/mod.rs
: Modified theHttpContextProvider
implementation to use the newhttp_context
function and updated the documentation to reflect the changes. [1] [2] [3]Dependency and import adjustments:
src/client/http.rs
: Reorganized and cleaned up the import statements to ensure all necessary dependencies are included and unused ones are removed.