Forum Discussion

Beno_Iskratel's avatar
Beno_Iskratel
Frequent Contributor
12 years ago

MonitorListener

hello,

i'm using HTTP Monitor (tunel).
everything works ok, i would just like to save all requests and responses that go through that tunel into some file.
is there any other way than use "Event" MonitorListener?
i don't know how to access request and response from those MonitorListeners.

can someone please explain me? perhaps short example?

tnx,
beno

2 Replies

  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    ok,
    i think i found answer:

    messageExchange.getRequestContentAsXml()
    messageExchange.getResponseContentAsXml()

    this is good enough for now.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    yes - these will return the body of the messages in XML format - you can use getRawResponseBody() and getRawRequestBody() as well if the messages have binary content..

    /Ole
    SmartBear Software