Oxy HTTP

A adapter for Oxy that uses Dart's dio package as the underlying HTTP implementation.

Pub Version License: MIT

Overview

This adapter bridges Oxy with the popular http package, providing a battle-tested HTTP implementation for those who prefer using the http package's underlying transport layer.

Installation

Add oxy_dio to your pubspec.yaml:

dependencies:
  oxy: latest
  oxy_dio: latest

Usage

Simply pass the OxyHttp adapter to your Oxy client:

import 'package:oxy/oxy.dart';
import 'package:oxy_dio/oxy_dio.dart';

void main() async {
  // Use the http package adapter
  final client = Oxy(adapter: OxyHttp());

  // All Oxy features work as normal
  final response = await client.get('https://jsonplaceholder.typicode.com/posts/1');
  final data = await response.json();
  print(data);
}

When to Use

  • You want to use the dio package's HTTP implementation
  • You need compatibility with existing dio package configurations
  • You prefer the dio package's behavior over the default adapter

Features

  • Full compatibility with all Oxy features
  • Uses the reliable dio package underneath
  • Works on all Dart platforms
  • Drop-in replacement for the default adapter

License

MIT License - see the LICENSE file for details.

Libraries

oxy_dio