Package com.azure.core.http.policy
Class HttpResponseLoggingContext
java.lang.Object
com.azure.core.http.policy.HttpResponseLoggingContext
The
HttpResponseLoggingContext class provides contextual information available during HTTP response logging.
This class is useful when you need to access information about an HTTP response during logging. It provides access to the HTTP response being received, the duration between the HTTP request being sent and the HTTP response being received, the contextual information about the response, and the try count for the request.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets the contextual information about the HTTP response.Gets the HTTP response being received.Gets the duration between the HTTP request being sent and the HTTP response being received.Gets the try count for the HTTP request associated to the HTTP response.
-
Method Details
-
getHttpResponse
Gets the HTTP response being received.- Returns:
- The HTTP response being received.
-
getResponseDuration
Gets the duration between the HTTP request being sent and the HTTP response being received.- Returns:
- The duration between the HTTP request being sent and the HTTP response being received.
-
getContext
Gets the contextual information about the HTTP response.- Returns:
- The contextual information.
-
getTryCount
Gets the try count for the HTTP request associated to the HTTP response.- Returns:
- The HTTP request try count.
-