Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrofit interceptor example #7

Open
jaumard opened this issue Aug 29, 2018 · 2 comments
Open

Retrofit interceptor example #7

jaumard opened this issue Aug 29, 2018 · 2 comments

Comments

@jaumard
Copy link
Contributor

jaumard commented Aug 29, 2018

Miss some example on how to use them:

  • multiple interceptors on a route (I just saw intereceptBefore/After but it's not a list)
  • global interceptors to multiple route (Just saw how put them on a route)
  • having the posibility to have interceptors after deserialization (for now only possible to have the response as String)
@tejainece
Copy link
Member

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

@jaumard
Copy link
Contributor Author

jaumard commented Aug 29, 2018

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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants