Coder Social home page Coder Social logo

gorkemtoprak / chucker-flutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from syedmurtaza108/chucker-flutter

0.0 0.0 0.0 422 KB

An HTTP requests inspector inspired by Chucker Android

Home Page: https://pub.dev/packages/chucker_flutter

License: MIT License

Shell 0.19% C++ 7.16% C 0.42% Objective-C 0.02% Kotlin 0.05% Dart 85.97% Swift 0.37% HTML 1.60% CMake 3.67% Ruby 0.55%

chucker-flutter's Introduction

Chucker Flutter

Codecov Badge Pub.dev Badge Popularity GitHub Build Badge MIT License Badge Flutter Platform Badge Stars Developed By Badge

Chucker Flutter

An HTTP requests inspector inspired by Chucker Android

Chucker Flutter inspects the HTTP(S) requests/responses triggered by your Flutter App. It works as an Interceptor and stores data relatated to network requests and responses on local storage, and providing a UI for inspecting and sharing their content.

Flutter Apps, using Chucker Flutter, show in-app notifications which tell the status (e.g. 200, 400, 500 and so) and requested url and upon clicking on details button it navigates to Chucker Flutter main screen. You cannot manipulate Chucker Flutter behaviour using its setting by navigating to Settings page from the menu button of Chucker Flutter main page.

chucker http sample

Getting Started

To use Chucker Flutter you need to add the pub spec dependency to your pubspec.yaml file of your flutter app.

Please verify the current latest version of Chucker Flutter so that you can enjoy the latest features.

dependencies:
  chucker_flutter: latest-version

To make Chucker Flutter work in Dio, just add it in your Dio object e.g.:

Dio().interceptors.add(ChuckerDioInterceptor());

To make Chucker Flutter work in Http, you need to use ChuckerHttpClient object e.g.:

final _chuckerHttpClient = ChuckerHttpClient(http.Client());
_chuckerHttpClient.get(Uri.parse('$_baseUrl$path'));

To make Chucker Flutter work in Chopper, you need to use ChuckerChopperInterceptor object e.g.:

final client = ChopperClient(
        baseUrl: 'https://jsonplaceholder.typicode.com',
        interceptors: [
          ChuckerChopperInterceptor(),
        ]
);

The very last thing is to connect Chucker Flutter screens to your app. To do so, you only need to add Chucker Flutter's NavigatorObserver in your app's MaterialApp e.g.:

MaterialApp(
      ...,
      navigatorObservers: [ChuckerFlutter.navigatorObserver],

By default Chucker Flutter only runs in debug mode but you can allow it to run in release mode too using its showOnRelease property e.g.:

void main() {
  ChuckerFlutter.showOnRelease = true;
  runApp(const App());
}

Congratulations! 🎊 You are done. Rest on us!

Features

  • Support for Dio and Http
  • Works in all (Windows💻, Linux🖥️, Mac🧑‍💻, Web🌍, Android📱, iOS📲) platforms (⚠️For android you need to make minSdkVersion 22 in build.gradle file)
  • Easy integration
  • Customization
  • Localization (Current support for English 🇺🇸 and Urdu 🇵🇰)
  • Searching🔍 and sharing👯
  • Json request and responses in tree form
  • Json request and response in pretty json format
  • Image URL preview
  • ChuckerHttpLoggingInterceptor for better readability of http request and response sent from client. To use this just add this interceptor in your ChopperClient
final exampleClient = ChopperClient(
  services: [
    _$ChopperApiService(),
  ],
  interceptors: [
    ChuckerHttpLoggingInterceptor() //This for logging,
    ChuckerChopperInterceptor(),
  ],
);

image

Libraries

Chucker FLutter uses the following open source libraries:

Contributors

Special thanks to these wonderful people👏 who are making our community bigger and better🔥


Adeyemo Adedamola

📖

fachrifaul

📖

License

MIT License

Copyright (c) 2022 Syed Murtaza

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

chucker-flutter's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.