Open jaumard opened 6 years ago
Here is a wiki for using interceptor with Resty: https://github.com/Jaguar-dart/client/wiki/Interceptors
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...)
Miss some example on how to use them: