Call unauthorized SSL request in Rust
It took me around 4 hours straight to resolve this issue, so I thought it might help someone in need.
Reqwest is a popular library for calling HTTP requests in Rust. It integrates with tokio run time. But if you’re in the case your HTTPs request does not have SSL certificate, then you cannot call the regular HTTP request like:
Calling this will throw SSL certificate error.
Instead you should use a client call with danger_accept_invalid_certs. Remember this will introduce security issue to man in the middle, so use it wisely.
Then you’re good to go.
Hope this helps guys & gals.