Permalink
Browse files

Adds stetho interceptor to the OSS react native networking module

Reviewed By: mkonicek

Differential Revision: D2669416

fb-gh-sync-id: d061711a412348b16ffb877e0178a05460fd95f2
  • Loading branch information...
Saurabh Aggarwal facebook-github-bot-0
Saurabh Aggarwal authored and facebook-github-bot-0 committed Nov 20, 2015
1 parent 205a35a commit a7c4ed106b28c609aa10f016e84e4bf22298d65c
@@ -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.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 @@
OkHttpClient client) {
super(reactContext);
mClient = client;
+ mClient.networkInterceptors().add(new StethoInterceptor());
mShuttingDown = false;
mDefaultUserAgent = defaultUserAgent;
}

0 comments on commit a7c4ed1

Please sign in to comment.