How to access Gravitee API ,HTTP CALLOUT context variable in Gravitee API Groovy Script

328 views Asked by At

How to access Gravitee HTTP CALLOUT context variable in Gravitee Groovy Script

  • name : callout-attribute
  • value : {#jsonPath(#calloutResponse.content, '$.field')}
1

There are 1 answers

0
AsithaL On

If you want to set the complete callout body into an attribute you can configure the callout policy to add a variable callout-attribute with {#calloutResponse.content}

Then in the groovy policy you can access it with context.attributes['callout-attribute']