Forum Discussion

mikek's avatar
mikek
New Contributor
16 years ago

How to pass the REST request as a parameter to a Groovy script in a test request

Hi,

I need to sign my REST requests before I send them, so for this I have a Groovy class which can receive the request and produce me a signature..

I want to pass the REST request itself as a parameter to the static method, something like this:
${=MyClass.sign("${#Project#whateverPrivateKey}", request}

I can't see a way to do it but I would like to use plain REST requests and not have a Groovy Script for each request which will calculate the signature.

Regards,
Mike

1 Reply

  • mikek's avatar
    mikek
    New Contributor
    Never mind, it seems to work but only if I do it right the first time..
    Request should be request (not capitalized).