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

Using ResponseInterceptor : add request execution elapsedTime to the InvocationContext #2617

Open
apeigney opened this issue Oct 24, 2024 · 0 comments

Comments

@apeigney
Copy link

I'm implementing the ResponseInterceptor interface to provide informations about each HTTP request to my users.
I wanted to display the request execution elapsedTime, but this data is not present in the InvocationContext.

in ResponseHandler, this could be as simple as

public Object handleResponse(
      String configKey, Response response, Type returnType, long elapsedTime) throws Exception {
    try {
      response = logAndRebufferResponseIfNeeded(configKey, response, elapsedTime);
      return executionChain.next(
          new InvocationContext(
              configKey,
              decoder,
              errorDecoder,
              dismiss404,
              closeAfterDecode,
              decodeVoid,
              response,
              returnType,
              elapsedTime));
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

1 participant