Jaguar-dart / client

Contains various packages for client side
46 stars 22 forks source link

Retrofit interceptor example #7

Open jaumard opened 6 years ago

jaumard commented 6 years ago

Miss some example on how to use them:

tejainece commented 6 years ago

Here is a wiki for using interceptor with Resty: https://github.com/Jaguar-dart/client/wiki/Interceptors

jaumard commented 6 years ago

Thanks for the wiki ! :) Here it's few improvements I think would be nice to have to be more modular:

Having a class Interceptor with before and after the we'll extend in order to create an Interceptor. Then pass it to the route like route.add(interceptor), like this a route can have a list of interceptors and each one doing his own work (one for logs only in debug, one for default headers, one for auth management...)