Hey, when using `HttpCallValidator` plugin on Ktor...
# ktor
a
Hey, when using
HttpCallValidator
plugin on Ktor client how can I access request time for registering latency in case of exception
handleResponseExceptionWithRequest
? When I do
request.call
it says call is not initialized? Any ideias? AFAIK only way would be to set request time on request attributes and then access it there
a
The problem is that the response may be not initialized at this point, thus the exception. To solve the problem I would save the request time into attributes too.
👍 1
a
Ya just wondering if there was another way to do this 😛 Also, noticed that for some odd reason which I can't understand
request.attributes.getOrDefault(AttributeKey, default)
returns T? instead of T 😛