http client: Dio vs http

1,454 views
Skip to first unread message

Dave H

unread,
Mar 12, 2021, 6:27:40 AM3/12/21
to Dart Misc
Hi,

Does anyone have a strong preference view on dio vs http?  I've seen mixed feedback. Any thoughts would be helpful. Thanks

Thanks,

Dave 
Mobile Developer

Natalie Weizenbaum

unread,
Mar 17, 2021, 8:48:17 PM3/17/21
to General Dart Discussion
Original author of the http package here! That package is in a bit of a weird state where it's effectively blocked from evolving its API, since it's widely used within Google and any breaking changes would entail a huge migration that no one has time for. For that reason, it's probably better to go with Dio since it'll be better able to keep its interface up-to-date.

--
For more ways to connect visit https://dart.dev/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/5274e5e9-acca-492b-bfd2-e96297ddea31n%40dartlang.org.
Message has been deleted

Andrew Byrne

unread,
Mar 25, 2021, 5:07:08 PM3/25/21
to mi...@dartlang.org, Natalie Weizenbaum
Three reasons I've encountered to pull dio from the stack:
- Http has top-level methods that do not require creating an instance; Dio does not have this pattern
  - so this prevents Dio's use in backgrounded flutter execution, like notifications/wear (a minority of use cases, b/c implementing the rest of that functionality ain't easy)
- Made in a territory controlled by the CCP
- Compatibility with google design patterns (outside Google)

The API looks nice and modern on Dio, so if you could use that nice interface and the above aren't a concern, go Dio; that being said, network calls from mobile apps are so bespoke and dart streams are so clean that I find it just as easy to roll my own in a "pull message BLOC" -AB

On Thu, Mar 18, 2021 at 3:27 AM Andrew Mezoni <andrew...@gmail.com> wrote:
What is the problem? Good software.
Very comfortable.
I mean the package "http" .

--
For more ways to connect visit https://dart.dev/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
Reply all
Reply to author
Forward
0 new messages