Use RN's OkHttpClient
This commit is contained in:
parent
a169a696b4
commit
48485e39e3
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue