http_plus - a drop-in replacement for http with HTTP/2 goodies

Overview

http_plus

pub.dev ci All Contributors pub points popularity likes GitHub issues GitHub stars GitHub forks

http_plus is a drop-in replacement for http with HTTP/2 goodies! Under the hood, it wraps http2 to make it compatible with APIs of http. Additionally, it fallbacks to HTTP/1.1 if H2 is not supported by the server.

CREDIT: This is a fork of http2_client package, which is no longer maintained.

This package is in active development. Any contribution, idea, criticism or feedback is welcomed.

Quick links

Package https://pub.dev/packages/http_plus
API Docs https://pub.dev/documentation/http_plus/latest/
Git Repo https://github.com/daadu/http_plus
Issue Tracker https://github.com/daadu/http_plus/issues

Using

The easiest way to use this library is via the top-level functions. They allow you to make individual HTTP requests with minimal hassle:

import 'package:http_plus/http_plus.dart' as http;

void main() async {
  final url = Uri.https('example.com', '/whatsit/create');
  final body = {'name': 'doodle', 'color': 'blue'};
  // Await http post request
  final response = await http.post(url, body: body);
  print('Response status: ${response.statusCode}');
  print('Response body: ${response.body}');
  // Close all open connection - if not required
  http.closeAllConnections();
}

For more detail on it check API docs of top-level functions.

Underneath it uses a default client with maxOpenConnection set as 8, this client is re-used among all top-level functions. If you want to have more fine-control over the client, then you can define a custom HttpPlusClient:

import 'package:http_plus/http_plus.dart';

void main() async {
  final client = HttpPlusClient(
    enableHttp2: true,
    context: SecurityContext(withTrustedRoots: true),
    badCertificateCallback: (cert, host, port) => false,
    connectionTimeout: Duration(seconds: 15),
    autoUncompress: true,
    maintainOpenConnections: true,
    maxOpenConnections: -1,
    enableLogging: false,
  );

  final url = Uri.https('example.com', '/whatsit/create');
  final body = {'name': 'doodle', 'color': 'blue'};
  // Await http post request
  final response = await client.post(url, body: body);
  print('Response status: ${response.statusCode}');
  print('Response body: ${response.body}');
  // Close all open connection
  client.close();
}

For more details on it check API docs of HttpPlusClient.

Todo

  • Web platform support (use BrowserClient directly)
  • Automatic testing
  • Handle HTTP/2 server side push
  • API for basic stats for each request - HTTP/2 vs 1.1, Connection Reuse vs New, etc
  • Allow user to customize logic for connection re-cycling
  • API to close connection to particular socket
  • Live web demo

Contribute

Check the Todo section above, before you begin with any contribution.

  1. You'll need a GitHub account.
  2. Fork the repository.
  3. Pick an issue to work on from issue tracker.
  4. Implement it.
  5. Add your name and email in authors section in pubspec.yaml file.
  6. Send merge request.
  7. Star this project.
  8. Become a hero!!

Features and bugs

Please file feature requests and bugs at the issue tracker.

Contributors

Thanks goes to these wonderful people (emoji key):


Harsh Bhikadia

💻 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

You might also like...

Reorderable table, row, column, wrap, and sliver list that allow drag and drop of the children. https://pub.dartlang.org/packages/reorderables

Reorderable table, row, column, wrap, and sliver list that allow drag and drop of the children. https://pub.dartlang.org/packages/reorderables

** Kindly submit PR if you encounter issues and please make sure you're using stable channel releases. ** Maintaining open source software ain't easy.

Jan 5, 2023

A simple way to bring drag’n’drop to flutter web

A simple way to bring drag’n’drop to flutter web

drop_zone is commonly used for file choosing by dragging and dropping a file(s) onto a designated widget. The user can then use the dropped html file(s).

Aug 2, 2022

gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required.

gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required.

GUI_AUTOMATION gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required. Install py

Oct 30, 2022

Flutter Tutorial - Drag & Drop In ListView

 Flutter Tutorial - Drag & Drop In ListView

Use Flutter to drag and drop items within the ListView to other locations and also drag the whole listview around.

Oct 17, 2022

This package supports drag & drop widgets inside the GridView.builder for multiplatform

This package supports drag & drop widgets inside the GridView.builder for multiplatform

This package supports drag & drop widgets inside the GridView.builder for multiplatform. It provides all the properties which are available in Gridview. builder and easy to implement with the few lines of code.

Dec 29, 2022

a widget provided to the flutter scroll component drop-down refresh and pull up load.

a widget provided to the flutter scroll component drop-down refresh and pull up load.

flutter_pulltorefresh Intro a widget provided to the flutter scroll component drop-down refresh and pull up load.support android and ios. If you are C

Jan 5, 2023

Native Drag and Drop for Flutter on iOS and MacOS

native_draggable A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package t

Dec 4, 2022

Drag and drop module for CITMATEL's 'strawberry' project

citmatel_strawberry_dnd Drag and drop module for CITMATEL's 'strawberry' project Getting Started This project is a starting point for a Flutter applic

Jan 6, 2023

Drop shadow effect for any widget in Flutter

Drop shadow effect for any widget in Flutter

DropShadow Drop shadow effect for any widget in flutter Parameters Widget child; // required double blurRadius; // default: 10.0 double borderRadius;

Nov 26, 2022

Widgets to support native drag and drop in Flutter.

Drag and Drop Flutter This is the repository for a plugin implementing drag and drop functionality for Flutter. This is a federated plugin. There is a

Dec 29, 2021

Flutter package for drag-and-drop reordering of two-level lists

Flutter package for drag-and-drop reordering of two-level lists

drag_and_drop_lists Two-level drag and drop reorderable lists. Features Reorder elements between multiple lists Reorder lists Drag and drop new elemen

Dec 18, 2022

A package that allows you to add native drag and drop support into your flutter app.

A package that allows you to add native drag and drop support into your flutter app.

native_drag_n_drop A package that allows you to add native drag and drop support into your flutter app. Currently supported features Support iPadOS 11

Dec 21, 2022

Drag and Drop for Dart web apps with mouse and touch support.

Dart Drag and Drop Drag and Drop for Dart web apps with mouse and touch support. GitHub | Pub | Demos and Examples Features Use any HTML Element as Dr

Nov 18, 2022

Awesome HTTP Inspector Tool | Flutter Library of the Week | EP-01 || EP-01

flutter_best_packages A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

Jul 21, 2022

✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. 🎖 Installing dependencies:

Dec 30, 2022

A simple dart http server in Koa2 style

Dia A simple dart http server like KoaJS. This package allows you to create a http / http server in a couple of lines. Dia creates a context from a bu

Dec 18, 2022

Liquidart is a Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider. Revival of the abandoned AQUEDUCT project.

Liquidart is a Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider. Revival of the abandoned AQUEDUCT project.

Liquidart is a modern Dart HTTP server framework. The framework is composed of libraries for handling and routing HTTP requests, object-relational map

Dec 27, 2022

server side dart micro-framework to handle incoming http requests

Queen Palace 🏰👑 Introduction server side dart micro-framework to handle incoming http requests

Aug 30, 2022

A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.

dio_http A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout

Dec 19, 2021
Owner
Harsh Bhikadia
code-blooded organism.
Harsh Bhikadia
Future based HTTP client for the Dart and Flutter

Uno Future based HTTP client for the Dart and Flutter. Uno, inspired by Axios, bringing a simple and robust experience to the crossplatform apps in Fl

Flutterando 56 Dec 16, 2022
Flutter_socks_proxy is a dart package, HTTP/Socks4/Socks5 proxy

flutter_socks_proxy flutter_socks_proxy is a dart package, HTTP/Socks4/Socks5 proxy Usage Use global import 'dart:convert';

null 12 Oct 23, 2022
Dio Package in Flutter - HTTP Requests and Interceptors.

Dio Package in Flutter - HTTP Requests and Interceptors. Learn how to use Flutter Dio package to make http requests, deal with interceptors and take care of unexpected server responses and failures in Flutter apps.

Sandip Pramanik 14 Nov 18, 2022
An ad-free, open-source bus timing app for bus services in Singapore, with goodies.

SGBuskeeper An ad-free, open-source bus timing app for bus services in Singapore, with goodies. Written in Dart, using Flutter. Planned Featureset Fav

Mark J. 0 Dec 17, 2021
React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.

English | Português Flutter Hooks A Flutter implementation of React hooks: https://medium.com/@dan_abramov/making-sense-of-react-hooks-fdbde8803889 Ho

Remi Rousselet 2.6k Dec 29, 2022
A replacement for Flutter's default SafeArea widget

ColorfulSafeArea A more customizable replacement for the SafeArea widget. It lets you set the color of your SafeArea without affecting the color of it

Ed 26 Nov 11, 2022
Realm is a mobile database: a replacement for SQLite & ORMs.

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the Realm SDK for Flutter

Realm 526 Dec 23, 2022
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 44 Nov 1, 2022
Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Betterment 14 Nov 28, 2022
An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio.

network_requests An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio. Platform Supported

Coder_Manuel 3 Dec 15, 2022