Forum Discussion

demus1's avatar
New Contributor
9 years ago

Retrieve request content with property subs

Is it possible to use an Event Listener to retrieve the outgoing request details AFTER any property substitutions have been applied. I need to generate an auth header, the algorithm for which requir...
  • demus1's avatar
    9 years ago

    I have solved my own problem, albeit via a clunky workaround


    def request = testStep.getTestRequest()
    String requestName = "\${" + request.getName() + "#Request}"
    def requestBody = context.expand( requestName )


    By using context.expand(), all embedded property substitutions are applied and it appears to work