compare_messages


Description:

public virtual signal bool compare_messages (Message expected_message, Message actual_message, ClientContext actual_client)

Emitted whenever the mock server must compare two Message<!-- -->s for equality; e.

g. when in the testing or comparison modes. Test code may connect to this signal and implement a handler which checks custom properties of the messages. The default handler compares the URI and method of the messages, but no headers and not the message bodies.

Signal handlers should return true if the messages match; and false otherwise. The first signal handler executed when this signal is emitted wins.

Parameters:

expected_message

a message containing the expected HTTP(S) message provided by handle_message

actual_message

a message containing the incoming HTTP(S) request

actual_client

additional data about the HTTP client making the request