Created
October 5, 2014 18:54
-
-
Save sauthieg/daec0561679c0ad9c24f to your computer and use it in GitHub Desktop.
OpenIG configuration file that shows interception mechanisms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"heap": { | |
"objects": [ | |
{ | |
"name": "HelloWorldChain", | |
"type": "Chain", | |
"comment": "Intercept the exchange processing", | |
"config": { | |
"filters": [ "AddHelloHeader" ], | |
"handler": "HelloWorld" | |
} | |
}, | |
{ | |
"name": "AddHelloHeader", | |
"type": "HeaderFilter", | |
"comment": "Add a Http Header in the Http message returned back from OpenIG", | |
"config": { | |
"messageType": "response", | |
"add": { | |
"X-Hello": [ "Hello World (I'm in a Header)" ] | |
} | |
} | |
}, | |
{ | |
"name": "HelloWorld", | |
"type": "StaticResponseHandler", | |
"config": { | |
"status": 200, | |
"entity": "<html><body><h1>Hello World From OpenIG</h1></body></html>" | |
} | |
} | |
] | |
}, | |
"handlerObject": "HelloWorldChain" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment