From 6a166bb7911dfcefe005b491e3306c72d507208d Mon Sep 17 00:00:00 2001 From: cmfatih Date: Sat, 22 Aug 2015 01:56:25 -0400 Subject: [PATCH] Add JSONP note --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index c3b537b2..11c2a561 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,19 @@ You can also report detailed subscription information on a per connection basis } ``` +Monitoring endpoints support JSONP for CORS so you can easily create single page +web applications for monitoring. Simply pass `callback` query parameter to any +endpoint. For example; `http://localhost:8222/connz?callback=cb` + +```javascript +// JQuery example + +$.getJSON('http://localhost:8222/connz?callback=?', function(data) { + console.log(data); +}); + +``` + ## Building This code currently requires at _least_ version 1.1 of Go, but we encourage