Http: Support for http interceptors, retry, timeout, parsing

Created on 27 Jun 2018  路  6Comments  路  Source: dart-lang/http

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)

type-enhancement

Most helpful comment

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

All 6 comments

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

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

demos77 picture demos77  路  3Comments

plake876 picture plake876  路  3Comments

Blykam picture Blykam  路  6Comments

engr-zeeshan picture engr-zeeshan  路  4Comments

Buckstabue picture Buckstabue  路  7Comments