cfug/dio ? reverse-engineered prompt

Reverse engineered prompt

Build me a Dart HTTP client package for Flutter and plain Dart that makes network requests easy and flexible.

I want one main library with a clean way to send GET, POST, and other requests, set global options, add interceptors for things like logging or auth, cancel requests, handle timeouts, upload and download files, and send form data. It should also support different adapters so it can work in different environments like mobile, web, and native style setups.

Please include a couple of simple example apps, one for Dart and one for Flutter, that show the common things people would actually do with it, like fetching JSON, uploading a file, and handling errors. Keep the public API nice and easy to use, and make sure the project is organized so the core package and plugins can live together cleanly. If you need to check current best practices or docs online, go ahead and look them up.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab