harp_apps.proxy.events

Inheritance diagram of harp_apps.proxy.events

class HttpMessageEvent[source]

Bases: TransactionEvent

__init__(transaction, message)[source]
Parameters:
class ProxyErrorEvent[source]

Bases: TransactionEvent

__init__(transaction, error)[source]
Parameters:
class ProxyFilterEvent[source]

Bases: Event

__init__(endpoint, /, *, request, response=None)[source]
Parameters:
create_execution_context()[source]
execute_script(script)[source]
Parameters:

script (Callable)

set_response(response)[source]
Parameters:

response (HttpResponse)

update(mixed)[source]
Parameters:

mixed (dict | HttpResponse | Self | None)

Return type:

Self

property criteria
class TransactionEvent[source]

Bases: Event

__init__(transaction)[source]
Parameters:

transaction (Transaction)

EVENT_FILTER_PROXY_REQUEST = 'proxy.filter.request'

Event fired when an incoming request is ready to be filtered, for example by the rules application.

EVENT_FILTER_PROXY_RESPONSE = 'proxy.filter.response'

Event fired when an outgoing response is ready to be filtered, for example by the rules application.

EVENT_PROXY_ERROR = 'proxy.error'

An error happened.

EVENT_TRANSACTION_ENDED = 'proxy.transaction.ended'

Event fired when a transaction is finished, before the response is sent back to the caller.

EVENT_TRANSACTION_MESSAGE = 'proxy.transaction.message'

Event fired when a message is sent to a transaction (either request or response).

EVENT_TRANSACTION_STARTED = 'proxy.transaction.started'

Event fired when a transaction is created.