-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsonp support for monitoring routes? #100
Comments
Just to /routez? On Wed, Aug 12, 2015 at 5:15 PM -0700, "Fatih Cetinkaya" notifications@github.com wrote: @derekcollison : Would you mind if I add jsonp support to monitoring routes and make a PR? That would help me to improve the tool that I'm working on... I didn't want to waste time if you are not okay with it. — |
All routes; |
Send a PR, sounds fine to me.. What application is this for? On Wed, Aug 12, 2015 at 6:51 PM, Fatih Cetinkaya notifications@github.com
|
Cool, will send a PR in a few days. It is for the tool that I'm working on. https://github.com/cmfatih/natsboard |
+1 That would help a lot also on another monitor I'm working on. |
Nice! On Wed, Aug 12, 2015 at 9:39 PM, Fatih Cetinkaya notifications@github.com
|
Have a look at https://github.com/pressly/gohttpware/tree/master/jsonp for a Jsonp middleware that stays out of the way and is triggered by the content type. It's my code, feel free to copy / augment if it helps |
@pkieltyka : It would be awesome if you take over this task and deliver since you have already experience with it. What you say? :) |
Sure, no prob. I'll submit PR tomm
|
Sound awesome to me 👍 |
@pkieltyka : I just made a PR for it. It was more easier than I thought. Somehow I always hesitate about my golang skills :) Can you check it and let me know whether I'm naif or not? https://github.com/nats-io/gnatsd/pull/103/files I locally test it and it works for; $.getJSON('http://localhost:8222/connz?callback=?', function(data) { console.log(data); });
or
$.ajax({
url: 'http://localhost:8222/connz',
dataType: 'jsonp',
jsonpCallback: 'callback',
success: function(data) {
console.log(data);
}
}); |
@derekcollison : Would you mind if I add JSONP support to monitoring routes and make a PR? That would help me to improve the tool that I'm working on... I didn't want to waste time if you are not okay with it.
Update: Note that I want to put more stuff to client side but can't do it due to CORS. That's the reason for JSONP.
The text was updated successfully, but these errors were encountered: