Created
September 21, 2020 18:00
-
-
Save Doko-Demo-Doa/bb00605a2bb4f75d0cdf5a4f5be5aedc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yourapp; | |
import com.facebook.react.modules.network.OkHttpClientFactory; | |
import com.facebook.react.modules.network.ReactCookieJarContainer; | |
import okhttp3.OkHttpClient; | |
public class CustomNetworkModule implements OkHttpClientFactory { | |
@Override | |
public OkHttpClient createNewNetworkModuleClient() { | |
return new OkHttpClient.Builder() | |
.dns(new CustomDNS()) | |
.cookieJar(new ReactCookieJarContainer()) | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment