Interceptify class
Main API for Interceptify network interceptor
Usage:
void main() {
Interceptify.initialize();
final dio = Dio();
dio.interceptors.add(Interceptify.dioInterceptor);
runApp(MyApp());
}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- devtoolsBridge → DevtoolsBridge
-
Get the DevTools bridge
no setter
- dioInterceptor → InterceptifyDioInterceptor
-
Get the Dio interceptor instance
Must call initialize() first
no setter
- isInitialized → bool
-
Check if Interceptify is initialized
no setter
- pendingRequestManager → PendingRequestManager
-
Get the pending request manager
no setter
- ruleManager → RuleManager
-
Get the rule manager
no setter
Static Methods
-
addRule(
InterceptRule rule) → void - Add an interception rule
-
clearRules(
) → void - Clear all rules
-
disableInterception(
) → void - Pause all requests (disable rules)
-
dispose(
) → void - Clean up all resources
-
enableInterception(
) → void - Resume request interception
-
getPendingRequestCount(
) → int - Get number of pending requests
-
getRuleCount(
) → int - Get number of active rules
-
getRules(
) → List< InterceptRule> - Get all rules
-
httpClient(
{Client? inner}) → InterceptifyHttpClient - Create an HTTP client that captures all requests/responses to DevTools.
-
initialize(
{bool debugLogging = true}) → void - Initialize Interceptify Must be called once before using the interceptor Only initializes in debug mode
-
registerDioInstance(
Dio dio) → void - Register a Dio instance to support "Retry" from DevTools. If you want to use the Retry feature, call this for each Dio instance.
-
removeRule(
String ruleId) → bool - Remove a rule by ID