alexliesenfeld / httpmock

HTTP mocking library for Rust
https://httpmock.rs
MIT License
471 stars 42 forks source link

This library depends on OpenSSL #82

Open FalkWoldmann opened 1 year ago

FalkWoldmann commented 1 year ago

Hi,

it seems like this lib depends on OpenSSL being installed on the host system because of the Isahc crate, which itself depends on OpenSSL. It would be nice to introduce a rustls flag so that users do not need to setup OpenSSL on their build systems.

aldanor commented 1 year ago

Just noticed the same thing. Would be nice to have a rustls flag to avoid an openssl dependency (however, it doesn't look like isahc supports it...).

alexliesenfeld commented 1 year ago

@FalkWoldmann , @aldanor Thanks for reaching out. There is already PR #72, but it is blocked by an upstream PR. Do you think it may solve your issue once merged?

lcmgh commented 1 year ago

Also upvoting this as I spent some effort to make my app not depend on openssl.

aldanor commented 1 year ago

@alexliesenfeld Yes this should do it, thanks. However it doesn't look like https://github.com/sagebind/isahc/issues/199 will be merged anytime soon (not earlier than autumn this year according to author)...

FalkWoldmann commented 1 year ago

Would it be possible to migrate to another http client like reqwest?

labannah9125 commented 12 months ago

ureq is already a dev-dep and could probably replace isahc. i ran into the same trying to write tests for a program on openbsd and compilation fails.

maybe make isahc use a feature or removed instead and let user choose their own client @alexliesenfeld ?

alexliesenfeld commented 11 months ago

Hi @FalkWoldmann and @labannah9125,

Thank you for your input. After reflecting on the proposed change, I have a few thoughts:

Please note that this represents a breaking change, but it should not be a problem for most users.

I hope this solves your problems.

alexliesenfeld commented 11 months ago

Released version 0.7.0-rc.1 with the discussed changes. Let me know if this solves your problem.

FalkWoldmann commented 11 months ago

Looks good to me, thanks!

alexliesenfeld commented 11 months ago

@FalkWoldmann Nice! Thanks for letting me know.