Forum Discussion

Rhonda_Ward's avatar
Rhonda_Ward
Occasional Contributor
13 years ago

How can I send HTTP/ Rest post request via Groovy script?

How can I send HTTP/ Rest post request via Groovy script?

Can someone please provide me the sample code?

6 Replies

  • Rhonda_Ward's avatar
    Rhonda_Ward
    Occasional Contributor
    Sorry I was not clear in my post. I want to construct HTTP post request using groovy and then execute it. Can you please provide me the example?

    Between, I did try HTTPBuilder class but was not able to execute the script successfully.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    For this you would need to use a third party http library for Java or Groovy (HTTPBuilder being one alternative). For support on using a third party library, please refer to that library's support options.

    Please note that soapUI currently does not support the Grape dependency loader mechanism. Any external library (and its dependencies) will have to be manually placed in the bin\ext directory of your soapUI installation.

    Regards,
    Dain
    SmartBear Sweden
    • LoundesM's avatar
      LoundesM
      Contributor

       as this is an old post, is this still the case or is there now a means of doing this without using 3rd party libraries?

      • nmrao's avatar
        nmrao
        Champion Level 3
        You want to put your use case? when there is readily available steps available, why do you need to use groovy to do this?