create
Creates a NetworkDebugTab that captures only OkHttp traffic (via the interceptor from Lustro.networkInterceptor), and the messages of the WebSockets that the app creates with the factory from Lustro.webSocketFactory. The redactor, the classifier, and the captureFilter apply to those sockets too.
This is the safe, default factory: it does not touch the platform HttpURLConnection machinery, so it needs no opt-in. To additionally capture HttpURLConnection traffic, use the overload that takes capturePlatformHttp, which is gated by ExperimentalPlatformCapture.
Parameters
when non-null, the Send form sends through this client, as one sender named "Default" whose relative URLs resolve against DebugConfig.appServerBaseUrl; when null, the Send route is hidden. To send through several clients, or through one that is built after Lustro, use the overload that takes senders.
tags captured URLs with category labels (default: none).
removes sensitive data at capture time (default: DefaultRedactor).
persists mock rules; null keeps them in memory.
decides which requests are captured (default: all). It affects capture only: mock rules and the throttle still apply to a request it skips. The Network tab shows how many it skipped, with its description.
Creates a NetworkDebugTab whose Send form offers senders, for example one for each OkHttp client that the app builds with its own interceptors or for its own host. Otherwise the same as the overload that takes senderClient.
Parameters
the senders the Send form lists, in this order; the first one is the default, also for POST send without a sender. Each resolves relative URLs against its own base URL; DebugConfig.appServerBaseUrl does not apply to them. An empty list hides the Send route.
tags captured URLs with category labels (default: none).
removes sensitive data at capture time (default: DefaultRedactor).
persists mock rules; null keeps them in memory.
decides which requests are captured (default: all). It affects capture only: mock rules and the throttle still apply to a request it skips. The Network tab shows how many it skipped, with its description.
Throws
when two senders have the same name.
Creates a NetworkDebugTab, optionally installing the process-global HttpURLConnection capture.
capturePlatformHttp has no default so this overload never collides with the safe create above. When true, the runtime installs the platform HttpURLConnection capture in onStart (best-effort, fail-open). This rests on a non-public platform detail, hence the ExperimentalPlatformCapture opt-in.
Parameters
when non-null, the Send form sends through this client, as one sender named "Default" whose relative URLs resolve against DebugConfig.appServerBaseUrl; when null, the Send route is hidden.
when true, installs the process-global HttpURLConnection capture (best-effort, fail-open).
tags captured URLs with category labels (default: none).
removes sensitive data at capture time (default: DefaultRedactor).
persists mock rules; null keeps them in memory.
decides which requests are captured, OkHttp and HttpURLConnection alike (default: all). It affects capture only: mock rules and the throttle still apply to an OkHttp request it skips. The Network tab shows how many it skipped, with its description.
Creates a NetworkDebugTab whose Send form offers senders, optionally installing the process-global HttpURLConnection capture. See the overload that takes senders and the one that takes senderClient and capturePlatformHttp.
Parameters
the senders the Send form lists, in this order; the first one is the default. An empty list hides the Send route.
when true, installs the process-global HttpURLConnection capture (best-effort, fail-open).
tags captured URLs with category labels (default: none).
removes sensitive data at capture time (default: DefaultRedactor).
persists mock rules; null keeps them in memory.
decides which requests are captured, OkHttp and HttpURLConnection alike (default: all). It affects capture only: mock rules and the throttle still apply to an OkHttp request it skips. The Network tab shows how many it skipped, with its description.
Throws
when two senders have the same name.