RobotPajamas / Stetho-Couchbase

Stetho-Couchbase is a plugin for Stetho to enable visualizing and debugging Android Couchbase databases in Chrome
http://www.sureshjoshi.com/mobile/visualizing-couchbase-chrome-stetho/
Apache License 2.0
12 stars 4 forks source link

Sniff traffic #6

Closed neopaf closed 7 years ago

neopaf commented 7 years ago

Is it possible to add to Stetho the network exchange between Couchbase Lite and a Couchbase Sync Gateway?

(or maybe it is already there and I'm not initialising properly)

sureshjoshi commented 7 years ago

@neopaf Have you tried using the Stetho network helpers? https://facebook.github.io/stetho/

Couchbase uses OKHttp3 if I recall correctly, so maybe this could work?

compile 'com.facebook.stetho:stetho-okhttp3:1.5.0' 
neopaf commented 7 years ago

maybe! thanks for the pointer.

didn't do it (yet), outline (for guys who would google this up): subclass CouchbaseLiteHttpClientFactory in getOkHttpClient return super.getOkHttpClient with interceptor as https://github.com/facebook/stetho use manager.setDefaultHttpClientFactory to replace factory to this one.

neopaf commented 7 years ago

Suresh, I guess, this is not up to this issue, closing it.