Go to new doc!

+49 228 5552576-0


info@predic8.com

groovy

Can be used in

proxy, serviceProxy, soapProxy, transport

Syntax

				<groovy >[groovy script]</groovy >
			
Listing 1: groovy Syntax

Sample

				<serviceProxy port="2000">
					<request>
						<groovy>
							exc.request.header.add("X-Groovy", "Groovy interceptor")
							println "X-Groovy header added." 				
							CONTINUE
						</groovy>						
					</request>
					<target host="www.predic8.de" />		
				</serviceProxy>						
			
Listing 2: groovy Example

Content

The script to be executed.

Flow

This interceptor is by default applied to both requests and responses. By wrapping it in an <request>...</request> (or <response>...</response>) element, you can select to apply it only to requests (or only to responses). See request and response.