Forum Discussion

vishalpatel's avatar
vishalpatel
Occasional Contributor
8 years ago

How do i fetch raw request for REST, the one that you see by clicking on the RAW button,using groovy

How do i fetch a raw request using a Groovy script.

 

Understand that I don't want the raw request shown in the custom property, but the one which you can see when you click on the RAW tab.

 

it includes, the endpoint details, headers, body etc.

 

something like this.

 

GET https://chrus.au.club.io/orders/0754855/memo HTTP/1.1
Accept-Encoding: gzip,deflate
X-Transaction-Id: gfr456d03ygh38s2
Host: chorus-scg-api-v1-sit.au.cloudhub.io
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_112)