Forum Discussion

ramakrishnakila's avatar
14 years ago

Problem with 'GET' request parameters in RESTful services th

Problem with 'GET' request parameters in RESTful services through groovy script.

Can you please let me know the API method to get the request
  • balak84's avatar
    balak84
    Occasional Contributor
    Hi,

    I think this should help you out.

    def utils = new com.eviware.soapui.support.GroovyUtils( context );
    def project = testRunner.testCase.testSuite.project ;
    def tc = project.testSuites["TestSuiteName"].testCases["TestCaseName"]
    def httpRequestHeaders = tc.testSteps["TestStepName"].testRequest.requestHeaders; //captures the request Header value
    def httpRequestContent = tc.testSteps["TestStepName"].testRequest.requestContent; //captures the request Content value
    log.info httpRequestHeaders
    log.info httpRequestContent

    Regards.