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

Add onFilter for Interceptor #10489

Merged
merged 2 commits into from
May 7, 2021
Merged

Add onFilter for Interceptor #10489

merged 2 commits into from
May 7, 2021

Conversation

315157973
Copy link
Contributor

Motivation

The current interceptor is very unfriendly to http processing.
Since the interceptor obtains references to request and response, and many properties of these objects cannot be modified, so we can only read but not modify them.
Therefore, we must wrap request and response. However, the attributes we want to modify are different. Some people want to change the header, and some people want to modify the queryParam. This requires very high flexibility of HttpWrapper.
At least for now it is not supported.

Modifications

Add onFilter for Interceptor, so that we can modify request and response like Filter, user can customize Wrapper

Verifying this change

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@merlimat merlimat added this to the 2.8.0 milestone May 7, 2021
@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label May 7, 2021
@merlimat merlimat merged commit 74b1c05 into apache:master May 7, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request May 11, 2021
* Add onFilter for Interceptor

* code style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants