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

Remove http client #90

Merged
merged 23 commits into from
Oct 15, 2023
Merged

Remove http client #90

merged 23 commits into from
Oct 15, 2023

Conversation

alexliesenfeld
Copy link
Owner

When httpmock is used as a library only (not for connecting to a remote mock server using MockServer::connect and the like), we can eliminate the need for a real HTTP client altogether. This not only addresses the TLS issues but also reduces the dependency tree by approximately 60 crates!

Some users reported they also use httpmock as a standalone mock server behind proxies and other infrastructure (like Kubernetes), which may be SSL-enabled. This still requires a real HTTP client i.m.o. For this scenario, I want to hold off until the isahc upstream PR gets merged, as my experience with isahc has been very positive so far. However, to opt into using isahc, users need to enable the “remote” feature flag, which will only be used to connect to remote mock servers. As a consequence, functions like MockServer::connect, MockServer::connect_async, and MockServer::connect_env will only be available when the “remote” feature is turned on.

This represents a breaking change.

Fixes #82.

@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (ce8a5e4) 79.79% compared to head (29eda3d) 72.69%.

❗ Current head 29eda3d differs from pull request most recent head cde1cca. Consider uploading reports for the commit cde1cca to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   79.79%   72.69%   -7.10%     
==========================================
  Files          19       20       +1     
  Lines        1336     1366      +30     
==========================================
- Hits         1066      993      -73     
- Misses        270      373     +103     
Files Coverage Δ
src/api/adapter/mod.rs 40.00% <ø> (-24.87%) ⬇️
src/api/server.rs 93.54% <ø> (ø)
src/server/mod.rs 83.89% <100.00%> (ø)
src/api/adapter/local.rs 82.22% <77.77%> (-3.99%) ⬇️
src/api/adapter/standalone.rs 70.00% <81.81%> (+2.65%) ⬆️

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexliesenfeld alexliesenfeld merged commit fbacada into master Oct 15, 2023
1 check failed
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 this pull request may close these issues.

This library depends on OpenSSL
1 participant