Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Remove broken example output

...

Code Block
languagejavascript
themeConfluence
ruleset a1299x188 {
	meta {
		name "Send Directive Example"
		author "nathan cerny"
		logging on
	}
	dispatch {
		// domain "exampley.com"
	}
    rule page_view {
        select when pageview ".*"
        pre {
	     resp = 
             http:get('http://webhooks.kynetxapps.net/h/a1299x188.dev/directive_example');
	     content = resp.pick('$..content');
	}
        append('body', '<h1>Directive Response: </h1>' + content);
    }
	rule directive_example {
		select when webhook directive_example
		send_directive("text") with body = "my text response";
	}
}

The following demonstrates the preceding rule:

Iframe
srchttp://dl.dropbox.com/u/57162158/kynetx_examples/send_directive_example.html
width750px
idsend_directive_demo
titleDemonstration of send_directive()