GithubHelp home page GithubHelp logo

irmobydick / sherlock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shehabic/sherlock

0.0 2.0 0.0 11.97 MB

Powerful Android in-app network visualizer for your network requests

Kotlin 96.19% Java 3.81%

sherlock's Introduction

Sherlock

Sherlock is a shorthand for "Network Sherlock Holmes" a simple lib that you can plug into your http client to capture everything around network requests, which then provides you or your QA team member with enough info about requests.

Why not use a proxy?

  • Sherlock is not to replace your normal proxy like. Charles Proxy for example, however the right question would be .. how many times did something go wrong while QAing your app then you realized that it's too late as you were not proxying?

How to use it?

it's a very simple and straight forward for v.0.X only OKHttp is supported.

  1. Add the dependency to your gradle.
allprojects {
    repositories {
	maven { url 'https://jitpack.io' }
    }
}
dependencies {
    debugImplementation 'com.github.shehabic.sherlock:sherlock:v0.10.5'
    releaseImplementation 'com.github.shehabic.sherlock:sherlock-no-op:v0.10.5'
}
  1. on app startup initialize sherlock by NetworkSherlock.getInstance().init(appContext)
  2. then attach Sherlock's okhttp intercepter to your OKHttpClient as follows:

Kotlin

val client: OkHttpClient = OkHttpClient.Builder().addInterceptor(SherlockOkHttpInterceptor()).build()

Java

OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new SherlockOkHttpInterceptor()).build()

Advanced options

Show/Hide anchor - Show/Hide network activity indicator Kotlin

NetworkSherlock
  .getInstance(NetworkSherlock.Config(showAnchor = true, showNetworkActivity = true))
  .init(this)

Pause/Resume Recording

NetworkSherlock.getInstance().pauseRecording()
NetworkSherlock.getInstance().resumeRecording()

Check the demo app which is using many feature of Sherlock's lib

Roadmap

Enahnce Export Format

  • Export whole sessions in a machine readable format
  • Export request in cURL format
  • Export standard http-request format
  • Export Charles-Proxy files for sessions

sherlock's People

Contributors

shehabic avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.