pimeys / rust-web-push

A Web Push library for Rust
Apache License 2.0
113 stars 21 forks source link

Fixes "unknown error encrypting the message" #24

Closed CypherNaught-0x closed 3 years ago

CypherNaught-0x commented 3 years ago

This pull request adresses an issue I faced after upgrading the dependencies. The hyper client has now been set to http1. Additional trace statements were added to help with debugging and finally I replaced the extend_from_slice function since the description says it will be deprecated in the future.

As for your idea to make this runtime independent. I would love to help on that but don't quite know where to get started. Maybe you could point me in the right direction?

pimeys commented 3 years ago

Maybe try out a http client that is working with async-std and tokio. Surf is a good choice. I don't remember other dependencies to a runtime, maybe timeouts that you can easily abstract with cfg macros if needed.

CypherNaught-0x commented 3 years ago

Surf does look like a great fit especially in this limited use case. Apparently hyper can be coerced into working with async-std also via a custom connector. I'll look into it though I believe surf will be the way to go. Thanks for the feedback.