-
Notifications
You must be signed in to change notification settings - Fork 189
[http client]: add HTTPS support #210
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo nits.
It's surprising how hard the "easy" things are sometimes. I don't know how you could have done any better, but it sure is ugly.
|
||
#[tokio::test] | ||
async fn https_works() { | ||
let client = HttpClient::new("https://kusama-rpc.polkadot.io", HttpConfig::default()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind this actually, but some would make a big stink about having tests depend on the network.
@maciejhirsz do you have a strong opinion here (if not, then let's keep it as-is)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I don't know how to test it locally, I suppose I need to create a self-signed certificate on localhost? This was simpler :)
Any suggestions?
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
We could enable TLS globally and make it non-optional, we have it for the |
@niklasad1 is this ready to be merged? |
Yeah but I think we should Also, #227 could make this cleaner I suppose ^^ |
Up to you to merge or not. FWIW I think TLS enabled for both is ok, at least for now. |
I will enable TLS for both it makes configuration simpler for now. After we remove the |
Attempt to add support for
HTTPS
via feature flags forrustls 0.21 for tokio 0.2
andrustls 0.22 tokio 1.0
.It's so damn ugly so I'm almost willing to maintain two different branches instead...