pwittchen / ReactiveNetwork

Android library listening network connection state and Internet connectivity with RxJava Observables
http://pwittchen.github.io/ReactiveNetwork/docs/RxJava2.x/
Apache License 2.0
2.53k stars 276 forks source link

[Question] What is a reason to use http instead of https protocol in your library internal requests? #443

Closed isabsent closed 4 years ago

isabsent commented 4 years ago

If I don't use android:usesCleartextTraffic="true" in manifest and don't specify network_security_config.xml with permitted hosts, I get

java.io.IOException: Cleartext HTTP traffic to clients3.google.com not permitted

It is OK, but what is a reason to use http:// in your library internal requests, which are the reason of above exception? Why don't you use https://?

pwittchen commented 4 years ago

I had some problems with pinging Google server over https protocol. Here you can see commit, which changed that with appropriate git commit message and links to the referenced issues: https://github.com/pwittchen/ReactiveNetwork/commit/d8556be2f0e981c441a5a1d1e6f050e1d27445ba

I don't know if Google changed something in their infrastructure, but I know I was experiencing problems with https as well as other library users. If you really want to use https, you can customize host and protocol via library (see documentation in README.md). Existing address and protocol are just default values.