HTTPLogger Class

A policy that logs HTTP request and response to the DEBUG logger.

This accepts both global configuration, and kwargs request level with "enable_http_logger"

Inheritance
HTTPLogger

Constructor

HTTPLogger(enable_http_logger=False)

Parameters

enable_http_logger
default value: False

Methods

on_request

Is executed before sending the request to next policy.

on_response

Is executed after the request comes back from the policy.

on_request

Is executed before sending the request to next policy.

on_request(request: Request, **kwargs: Any) -> None

Parameters

request
Required

on_response

Is executed after the request comes back from the policy.

on_response(request: Request, response: Response, **kwargs: Any) -> None

Parameters

request
Required
response
Required