Use RN's OkHttpClient

This commit is contained in:
Vitaliy Vlasov 2020-06-19 14:10:24 +03:00
parent a169a696b4
commit 48485e39e3
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964
1 changed files with 2 additions and 5 deletions

View File

@ -18,6 +18,7 @@ import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import com.facebook.react.modules.network.OkHttpClientProvider;
import static okhttp3.internal.Util.UTF_8; import static okhttp3.internal.Util.UTF_8;
@ -177,11 +178,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
}; };
httpClient = new Builder() httpClient = OkHttpClientProvider.getOkHttpClient();
.followRedirects(false)
.followSslRedirects(false)
.build();
} }
public RNCWebViewManager(WebViewConfig webViewConfig) { public RNCWebViewManager(WebViewConfig webViewConfig) {