Http Network Calls

Monitor and log Http calls seamlessly with Zipy for enhanced debugging and performance optimization.

Use the ZipyHttpClient to call http network calls in your flutter application

import 'package:zipy_flutter/zipy_flutter.dart';

final client = ZipyHttpClient();
client.get(url); or client.post(url);

Example-

final client = ZipyHttpClient();
const String url = 'url';

final Map<String, String> headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer your_api_key',
};

try {
  final response = await client.get(
    Uri.parse(url),
    headers: headers,
  );
} catch (e) {
  print(e);
}

or

final client = ZipyHttpClient(); 
const baseUrl = 'url';
var request = http.Request('GET', Uri.parse(baseUrl));
http.StreamedResponse response = await client.send(request);

Use the instance of client to call the api by importing it wherever needed or you can call it in your network call wrapper.

Last updated