-
Notifications
You must be signed in to change notification settings - Fork 296
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
Introduce ConnectionInterceptor for individual connection processing #129
base: master
Are you sure you want to change the base?
Conversation
Currently, it is only possible to set static http header values once. It is not possible to add header values which change with each network request. This introduces an interceptor interface to process each connection, i.e. add custom header which change with each request.
Hello. This seems like something that would be useful. Though the current implementation ignores the If you would need to only set additional header values then why does the interceptor have the option to override the used Have you tried sending a user profile picture with this PR? Does it not interfare with sending that multipart request? Is this special header information required for your firewall? Or what is exactly looking at that special header value? |
Thanks for your comment!
I moved the setting of the
We implemented it in an interceptor style, because we did not want to intrude to much on the Countly codebase.
We did not test this, because we do not use this feature. I will take a look again.
We use Countly in a sensitive application which uses certain security measures. In this particular case, we implemented something called |
@ArtursKadikis Unfortunately, I was not able to test this, because even with setting |
Motivation
Currently, it is only possible to set static http header values once. It is not possible to add header values which change with each network request.
We have the need to add headers which change with each request, because we sign each request (request method, request body and some other meta information) with a timestamp in our app.
What changed
Similarly to Okhttp, this introduces an interceptor interface
ConnectionInterceptor
to process each connection, i.e. add custom header which change with each request. It can be set at the beginning and will be called for each network request.Example