Skip to content
OtaconPublic

About

A Kotlin Multiplatform network inspector

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Peekniko logo

Peekniko

A lightweight network inspector for your app. Capture and explore HTTP requests and responses right on your device.

Kotlin Kotlin Multiplatform Android Minimum Android API 22 Maven Central version Apache 2.0 license GitHub stars

Peekniko request list Peekniko request summary Peekniko response details

Compatibility

Library Platform
OkHttp (Client) Android, Desktop
Ktor (Client) Android, Desktop (iOS, Web WIP)
URLSession (Client) iOS (WIP)
SQLDelight (Storage) Android, Desktop (iOS, Web WIP)

Documentation

Quick start: OkHttp + SQLDelight

Ensure Maven Central is included in settings.gradle.kts:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Add the dependencies to your app module's build.gradle.kts (replace the version placeholders):

dependencies {
    debugImplementation("io.github.otacon.peekniko:client-okhttp:<peekniko-version>")
    debugImplementation("io.github.otacon.peekniko:storage-sqldelight:<peekniko-version>")
    releaseImplementation("io.github.otacon.peekniko:client-noop:<peekniko-version>")
}

If your app already uses SQLDelight, you don't need to add any SQLDelight dependencies. Otherwise, add them with debugImplementation:

dependencies {
    debugImplementation("app.cash.sqldelight:runtime:<sqldelight-version>")
    debugImplementation("app.cash.sqldelight:coroutines-extensions:<sqldelight-version>")
    debugImplementation("app.cash.sqldelight:android-driver:<sqldelight-version>")
}

Configure persistent storage before building your OkHttp client:

import peekniko.Peekniko
import peekniko.storage.sqldelight.sqlDelightStorage
import peekniko.okhttp.interceptor

Peekniko.configure {
    sqlDelightStorage(name = "peekniko.db")
}

val client = OkHttpClient.Builder()
    .addInterceptor(Peekniko.interceptor)
    .build()

About

A Kotlin Multiplatform network inspector

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages