Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Param interceptors for @Rest #479

@yDelouis

Description

@yDelouis

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

Thanks for your awesome work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions