mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
Adds stetho interceptor to the OSS react native networking module
Reviewed By: mkonicek Differential Revision: D2669416 fb-gh-sync-id: d061711a412348b16ffb877e0178a05460fd95f2
This commit is contained in:
parent
205a35ad37
commit
a7c4ed106b
@ -248,6 +248,8 @@ dependencies {
|
||||
compile 'com.android.support:recyclerview-v7:23.0.1'
|
||||
compile 'com.facebook.fresco:fresco:0.8.1'
|
||||
compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1'
|
||||
compile 'com.facebook.stetho:stetho:1.2.0'
|
||||
compile 'com.facebook.stetho:stetho-okhttp:1.2.0'
|
||||
compile 'com.fasterxml.jackson.core:jackson-core:2.2.3'
|
||||
compile 'com.google.code.findbugs:jsr305:3.0.0'
|
||||
compile 'com.squareup.okhttp:okhttp:2.5.0'
|
||||
|
@ -25,6 +25,7 @@ import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
import com.facebook.stetho.okhttp.StethoInterceptor;
|
||||
|
||||
import com.squareup.okhttp.Callback;
|
||||
import com.squareup.okhttp.Headers;
|
||||
@ -65,6 +66,7 @@ public final class NetworkingModule extends ReactContextBaseJavaModule {
|
||||
OkHttpClient client) {
|
||||
super(reactContext);
|
||||
mClient = client;
|
||||
mClient.networkInterceptors().add(new StethoInterceptor());
|
||||
mShuttingDown = false;
|
||||
mDefaultUserAgent = defaultUserAgent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user