Skip to content

Instantly share code, notes, and snippets.

@sauthieg
Created October 5, 2014 18:54
Show Gist options
  • Save sauthieg/daec0561679c0ad9c24f to your computer and use it in GitHub Desktop.
Save sauthieg/daec0561679c0ad9c24f to your computer and use it in GitHub Desktop.
OpenIG configuration file that shows interception mechanisms
{
"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