You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
I'm using AndroidAnnotations for an application which deals with a Rest API.
For this API, I need to pass an access token as a query parameter of each request.
This access token can't be hard coded in the URL so I use a ClientHttpRequestInterceptor to add this parameter dynamically.
The problem is that I need to add this interceptor each time I use the @Rest annotations in Activity or Fragment which is a bit annoying, the more so as if I forget to do it, it leads me to long times of debugging...
So, I was wondering if there were possible to add a parameter for the annotation @Rest. The value of this annotations would be an array of classes implementing ClientHttpRequestInterceptor.
This would also enable us to add interceptors for logging purposes easily (and maybe a built-in log interceptor).
Sorry for not proposing code to solve this issue. Edit: I will submit a pull request soon.
Can you post code on how you would use the addition in PR #485 to add query string parameters? An API with querystring params seems like a common enough scenario to warrant a simpler way of binding to them right?
Hi,
I'm using AndroidAnnotations for an application which deals with a Rest API.
For this API, I need to pass an access token as a query parameter of each request.
This access token can't be hard coded in the URL so I use a
ClientHttpRequestInterceptorto add this parameter dynamically.The problem is that I need to add this interceptor each time I use the
@Restannotations inActivityorFragmentwhich is a bit annoying, the more so as if I forget to do it, it leads me to long times of debugging...So, I was wondering if there were possible to add a parameter for the annotation
@Rest. The value of this annotations would be an array of classes implementingClientHttpRequestInterceptor.This would also enable us to add interceptors for logging purposes easily (and maybe a built-in log interceptor).
Sorry for not proposing code to solve this issue.
Edit: I will submit a pull request soon.
Thanks for your awesome work.