Call it from XInteractionHandle_handle, i.e.
Function XInteractionHandle_handle(oRequest)
InteractionHandler_handle(oRequest)
End Function
Btw the exemple is for a post request, a get would be something like this
oUCB = CreateUnoService("com.sun.star.ucb.UniversalContentBroker")
oId = oUCB.createContentIdentifier(sURL)
oContent = oUCB.queryContent(oId)
oDataSink = CreateUnoListener("XDataSink_", "com.sun.star.io.XActiveDataSink")
oCommandEnv = CreateUnoListener("XCommandEnv_", "com.sun.star.ucb.CommandEnvironment")
oGetArgs = CreateUnoStruct("com.sun.star.ucb.OpenCommandArgument2")
oGetArgs.Mode = 2
oGetArgs.Sink = oDataSink
aCommand = CreateUnoStruct("com.sun.star.ucb.Command")
aCommand.Name = "open"
oContent.execute(aCommand, 0, oCommandEnv)
oOutput = oDataSink.getInputStream()
[erAck: edited to format as code, see This is the guide - How to use the Ask site? - #6 by erAck ]