netinspektor is a Kotlin Multiplatform network inspection tool. It lets you monitor and inspect HTTP traffic from your Android, iOS, or Desktop app in real time — streamed directly to a native desktop application.
┌─────────────────────────┐ WebSocket ┌─────────────────────────────┐
│ Your App │ ──────────────────────►│ netinspektor Desktop │
│ (netinspektor-client) │ │ (macOS / Windows / Linux) │
│ │◄───────────────────────│ │
└─────────────────────────┘ Discovery └─────────────────────────────┘
- Embed netinspektor-client in your KMP app and create a
NetInspektorSession. - Call
session.logRequest(...)andsession.logResponse(...)whenever a network call is made. - The client automatically starts a local WebSocket server and announces itself to the discovery server.
- Open the netinspektor-desktop app — your device/session appears automatically.
- Inspect requests and responses in real time.
| Module | Description |
|---|---|
netinspektor-core |
Shared data models and constants used by both the client and desktop app |
netinspektor-client |
KMP library to embed in your app to capture and stream network events |
netinspektor-desktop |
Native desktop application for real-time inspection |
netinspektor-example |
Example KMP app demonstrating how to integrate the client library |
Add the dependency to your KMP module:
// build.gradle.kts
commonMain.dependencies {
implementation("com.evertwoud.netinspektor:netinspektor-client:1.0.1")
}val session = NetInspektorSession(sessionName = "MyApp")
session.start()val request = NetInspektorEvent.Request(
method = "GET",
url = "https://api.example.com/data",
headers = mapOf("Authorization" to "Bearer token"),
body = null
)
session.logRequest(request)
// ... perform the actual HTTP call ...
session.logResponse(
NetInspektorEvent.Response(
requestUuid = request.uuid,
statusCode = 200,
headers = responseHeaders,
body = NetInspektorEvent.Body(
contentType = "application/json",
data = responseBodyBytes
)
)
)Download and run the netinspektor desktop app. Your session will appear in the pairing window automatically. Double-click it to connect, or enter the host and port manually.
| Platform | netinspektor-core | netinspektor-client |
|---|---|---|
| Android | ✅ | ✅ |
| iOS (arm64, x64, simulatorArm64) | ✅ | ✅ |
| Desktop (JVM) | ✅ | ✅ |