def on_request(self, request: PipelineRequest[HTTPRequestType]) -> None:
        """This is executed before sending the request to the next policy.

        :param request: The PipelineRequest object.
        :type request: ~azure.core.pipeline.PipelineRequest
        """
        request_callback = request.context.options.pop("raw_request_hook", None)
        if request_callback:
            request.context["raw_request_hook"] = request_callback
            request_callback(request)
        elif self._request_callback:
            self._request_callback(request)

        response_callback = request.context.options.pop("raw_response_hook", None)
        if response_callback:
            request.context["raw_response_hook"] = response_callback
This is executed before sending the request to the next policy.

        :param request: The PipelineRequest object.
        :type request: ~azure.core.pipeline.PipelineRequest
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/policies/_custom_hook.py