https://github.com/bayunugroho2022/dio-request-inspector
Debug and Sharing your HTTP Request/Response with UI Inspector.
https://github.com/bayunugroho2022/dio-request-inspector
dart dart-library dart-package dio flutter flutter-package flutter-web inspector
Last synced: about 1 year ago
JSON representation
Debug and Sharing your HTTP Request/Response with UI Inspector.
- Host: GitHub
- URL: https://github.com/bayunugroho2022/dio-request-inspector
- Owner: bayunugroho2022
- License: bsd-3-clause
- Created: 2022-12-31T06:06:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-13T05:55:02.000Z (over 1 year ago)
- Last Synced: 2025-03-24T15:52:37.006Z (over 1 year ago)
- Topics: dart, dart-library, dart-package, dio, flutter, flutter-package, flutter-web, inspector
- Language: Dart
- Homepage: https://pub.dev/packages/dio_request_inspector
- Size: 990 KB
- Stars: 16
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Dio Requests Inspector
A HTTP inspector for Dio, which can intercept and log HTTP requests and responses.

## Features
- [X] Intercept and log HTTP requests and responses
- [X] Secure HTTP requests with passwords
- [X] Filter logs by request time, method, and status
- [X] Search logs by path
- [X] Easily share request and response data
- [X] Beautify JSON data
- [X] Beautiful user interface
## How to use
- Add the package with command
```bash
flutter pub add dio_request_inspector
```
- add `navigatorObservers` to your `MaterialApp`
```dart
navigatorObservers: [
DioRequestInspector.navigatorObserver,
],
```
- Wrap your `myApp` with `DioRequestInspectorMain`
```dart
void main() {
runApp(DioRequestInspectorMain(
isDebugMode: true,
child: MyApp(),
));
}
```
- add interceptor to your Dio instance
```dart
final DioRequestInspector inspector = DioRequestInspector(
isInspectorEnabled: true,
password: '123456', // remove this line if you don't need password
showSummary: false,
);
dio.interceptors.add(inspector.getDioRequestInterceptor());
```
see detail example
## Note
- tap ```Long press``` on your screen to show DioRequestInspector UI