dio_curl_interceptor library
Classes
- Ansi
- CachedCurlEntry
- CachedCurlEntryAdapter
- CachedCurlService
- Service class for managing cached cURL entries
- CacheOptions
- CurlBubble
-
Adds a floating cURL button and full-screen viewer overlay above app content.
Place this widget in
MaterialApp.builderso it survives route changes. - CurlConfig
- Immutable configuration for the interceptor's sinks and relay.
- CurlDetails
- see Ansi for more colors and styles
- CurlEvent
- CurlOptions
- CurlRelay
-
Orchestrates dispatch from one DioCurlInterceptor (or any caller) to a
fan-out of sinks, with a per-sink circuit breaker and shared dedupe cache
keyed by
CurlEvent.id. Dispatch is fire-and-forget so the dispatcher never blocks the Dio hot path. - CurlSink
- Handles CurlEvents produced by the Dio interceptor lifecycle. Peer to MessageSink — neither extends the other.
- CurlUtils
- A utility class for generating, logging, and caching cURL commands from Dio requests and responses.
- CurlViewer
- Full-screen cURL log viewer. Pass a controller to share its session state; otherwise the viewer owns and disposes its controller.
- DioCurlInterceptor
-
Public Dio interceptor that converts requests to cURL commands, runs them
through sinks, and exposes
sendMessagefor non-Dio messages. - DiscordEmbed
- A class to represent a Discord embed object.
- DiscordEmbedAuthor
- A class to represent a Discord embed author object.
- DiscordEmbedField
- A class to represent a Discord embed field object.
- A class to represent a Discord embed footer object.
- DiscordEmbedImage
- A class to represent a Discord embed image object.
- DiscordEmbedThumbnail
- A class to represent a Discord embed thumbnail object.
- DiscordSink
- Sends cURL events (and arbitrary messages) to Discord webhooks.
- DiscordWebhookMessage
- A class to represent a Discord webhook message. This class follows the Discord Webhook API structure.
- ErrorCurlEvent
- ErrorDetails
- ErrorInfo
- HiveSink
- Persists finished cURL entries (response + error) to the cached box via CachedCurlService. In-flight RequestCurlEvents are skipped because they have no final status yet.
- MessageSink
- Sends arbitrary messages — independent of Dio / HTTP / curl events. Peer to CurlSink; neither extends the other.
- NullSink
-
No-op sink used in tests to satisfy
List<CurlSink>without side effects. - PrettyConfig
- Configuration options for pretty printing HTTP requests and responses in a box format.
- PrinterSink
- Compact one-line summary of every CurlEvent, dispatched through printer.
- RelayOptions
- Dedupe options for CurlRelay.
- RequestCurlEvent
- RequestDetails
- RequestInfo
- ResponseCurlEvent
- ResponseDetails
- ResponseInfo
- SenderInfo
- Configuration class to hold sender information for webhook messages.
- Sink
- Common base for every sink — only knows its own name and how to dispose.
- StatusFilterSink
- Decorator CurlSink that forwards CurlEvents only when their HTTP status code falls inside a configured allow-list.
- TelegramSink
- Sends cURL events (and arbitrary messages) to Telegram via the Bot API.
Enums
- CurlBehavior
- ResponseStatus
- Represents the status of an HTTP response based on its status code.
Constants
-
defaultInspectionStatus
→ const List<
ResponseStatus> - kDefaultBugReporterUsername → const String
- kDefaultUsername → const String
- kLineLength → const int
- kNA → const String
- kPackageName → const String
- kPrefix → const String
- kPrinter → const Printer
- kXClientTime → const String
Properties
- logger → Logger
-
Top-level logger for the interceptor.
final
Functions
-
formatEmbedValue(
dynamic rawValue, {int? len = 1000, String? lang}) → String - Formats a value for embedding in Discord webhook messages.
-
genCurl(
RequestOptions options) → String? -
Generates a cURL command string from
RequestOptions. -
showCurlViewer(
BuildContext context) → Future< void> - Opens the full-screen cURL log viewer.