alice 0.0.1 copy "alice: ^0.0.1" to clipboard
alice: ^0.0.1 copied to clipboard

outdated

HTTP Inspector

Alice #

A HTTP inspector plugin for Flutter. Inspired from Chuck.

Install #

How to use #

Create Alice instance:

Alice alice = Alice(showNotification: true);

Add navigator key to your application:

MaterialApp( navigatorKey: alice.getNavigatorKey(), home: ...)

If you're using Dio, you just need to add interceptor.

Dio dio = Dio();
dio.interceptors.add(alice.getDioInterceptor());

If you're using HttpClient

httpClient
        .getUrl(Uri.parse("https://jsonplaceholder.typicode.com/posts"))
        .then((request) async {
      alice.onHttpClientRequest(request);
      var httpResponse = await request.close();
      var responseBody = await httpResponse.transform(utf8.decoder).join();
      alice.onHttpClientResponse(httpResponse, request, body: responseBody);
    });

If you're using http:

  http.get('https://jsonplaceholder.typicode.com/posts').then((response) {
      alice.onHttpResponse(response);
    });