fire_http

Last updated:

0 purchases

fire_http Image
fire_http Images
Add to Cart

Description:

fire http

A Firestrarter plugin who helps you to implement client of HTTP/1.1 or HTTP/2 on Flutter Project.
Features #
With this plugin, you can easily to use HTTP client with HTTP/1.1 or HTTP/2.
Using #
The easiest way to use this library is through the top-level functions. This is the sample to use it:
import 'dart:async';

import 'package:fire_http/fire_http.dart';

// the path of request
final path = Uri.parse('https://catfact.ninja/fact');
// create HttpClient with HTTP/1.1
final BaseHttpClient client1 = Http1Client();
// create HttpClient with HTTP/2
final BaseHttpClient client2 = Http2Client();

// request with HTTP/1.1 Client
final resClient1 = await client1.get(path);
// request with HTTP/2 Client
final resClient2 = await client2.get(path);

// print all responses
print('\n====== FIRE HTTP =====\n');
print('=> response Client1: \n${resClient1.body}\n');
print('=> response Client2: \n${resClient2.body}');
copied to clipboard
Additional information #
This Library is provide to set the certificate by [setSecurityContext()] function, set the proxy by [setProxy()] function, and set callback when the certificate is error by [onBadCertificate()] function.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.