callouts/python/extproc/example/add_custom_response/service_callout_example.py [86:101]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      self, headers: service_pb2.HttpHeaders,
      context: ServicerContext):
    """Custom processor on request headers.

    Args:
      headers (service_pb2.HttpHeaders): The HTTP headers received in the request.
      context (ServicerContext): The context object for the gRPC service.

    Returns:
      service_pb2.HeadersResponse: The response containing the mutations to be applied
      to the request headers.
    """
    if callout_tools.headers_contain(headers, "bad-header"):
      callout_tools.deny_callout(context)
    if callout_tools.headers_contain(headers, "mock"):
      return generate_mock_header_response()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



callouts/python/extproc/example/add_custom_response/service_callout_example.py [108:123]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      self, headers: service_pb2.HttpHeaders,
      context: ServicerContext):
    """Custom processor on response headers.

        Args:
          headers (service_pb2.HttpHeaders): The HTTP headers received in the response.
          context (ServicerContext): The context object for the gRPC service.

        Returns:
          service_pb2.HeadersResponse: The response containing the mutations to be applied
          to the response headers.
        """
    if callout_tools.headers_contain(headers, "bad-header"):
      callout_tools.deny_callout(context)
    if callout_tools.headers_contain(headers, "mock"):
      return generate_mock_header_response()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



