dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.03k stars 358 forks source link

Support for http interceptors, retry, timeout, parsing #172

Open Chris1234567899 opened 6 years ago

Chris1234567899 commented 6 years ago

In my opinion this library misses some basic functionality as of 2018.

Among them I would definately say http interceptors, a retry/retryWithDelay functionality and a timeout or cancel mechanism. Additionally it would be a nice to have to offer an automated parsing of the response, upload progress, and maybe some form of error extraction.

Some hints on additional functionality might be derived from the angular/common library as they have imo a very capable http client (https://github.com/angular/angular/tree/master/packages/common/http/src)

sir-boformer commented 6 years ago

I'm also missing a way to cancel/abort a long running request, e.g. a file download.

donny-dont commented 6 years ago

The master branch has middleware. You can make all those sort of things as middleware.

donny-dont commented 6 years ago

@nex3 this is a duplicate of https://github.com/dart-lang/http/issues/109

passsy commented 5 years ago

@donny-dont middleware is not available on master. It's only available on experimental which hasn't been touched for 10 months.

jirihradil commented 4 years ago

Hi, as a new to Flutter world, I facing the same need for global interceptors and found that dio has that features already. Any thoughts for using this package over dio? https://pub.dev/packages/dio

xinde commented 4 years ago

Hi, as a new to Flutter world, I facing the same need for global interceptors and found that dio has that features already. Any thoughts for using this package over dio? https://pub.dev/packages/dio

This package doesn't seem to be updated any more