Using ResponseInterceptor : add request execution elapsedTime to the InvocationContext
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
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));
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ResponseHandler.handleResponse and the InvocationContext and ResponseInterceptor APIs named in the issue. Trace how the elapsedTime argument is currently used, then expose it through the invocation context so response interceptors can access it. Done means an interceptor can read the HTTP request execution elapsed time from InvocationContext.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100