aia_chaser_http 0.1.0 copy "aia_chaser_http: ^0.1.0" to clipboard
aia_chaser_http: ^0.1.0 copied to clipboard

package:http client adapter for aia_chaser, enabling scoped AIA intermediate certificate chasing and transparent retry-once.

aia_chaser_http #

pub package License: BSD-3-Clause

A drop-in http.Client implementation for aia_chaser that enables scoped Authority Information Access (AIA) intermediate certificate chasing and transparent retry-once resilience for Flutter and Dart.


The Problem #

When interacting with backend servers that omit intermediate CA certificates, package:http throws:

ClientException: HandshakeException: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate

aia_chaser_http safely resolves this by chasing intermediate certificates via AIA, validating against the system root store, and retrying failed requests once upon successful chain completion.


Installation #

Add aia_chaser and aia_chaser_http to your pubspec.yaml:

dependencies:
  aia_chaser: ^0.1.0
  aia_chaser_http: ^0.1.0
  http: ^1.2.0

Quick Start #

1. Initialize AIA Chaser #

import 'package:aia_chaser/aia_chaser.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await AiaChaser.initialize(AiaConfig(
    hosts: {
      'api.example.com': const HostPolicy(
        chase: true,
        retryOnce: true, // Transparently retry upon validation
      ),
    },
  ));

  runApp(const MyApp());
}

2. Use AiaHttpClient #

import 'package:aia_chaser_http/aia_chaser_http.dart';

final client = AiaHttpClient();

// Safe requests with automatic AIA recovery
final response = await client.get(Uri.parse('https://api.example.com/v1/data'));
print(response.body);

client.close();

You can also pass an existing http.Client to wrap:

final customClient = AiaHttpClient(myExistingClient);
0
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publisheryadneshteli.me

Weekly Downloads

package:http client adapter for aia_chaser, enabling scoped AIA intermediate certificate chasing and transparent retry-once.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

aia_chaser, http

More

Packages that depend on aia_chaser_http