deverseli800/tidbits-js

jsonp request giving me 404

deverseli800 opened this issue · 2 comments

function historicaldatacontroller in showhidecontroller.js has what i believe to be a valid jsonp request but i get a 404 in the console. thoughts?

var url='
http://ec2-23-22-142-91.compute-1.amazonaws.com:1337/bbo.jsonpcallbac
k=JSON_CALLBACK';
$http.jsonp(url).success(function(data) {
console.log(data);
});

Come on Cesar, does that really look like a valid jsonp request to you?
Would I seriously define a route GET /bbo.jsonpcallback=JSON_CALLBACK? I
think you're missing a ?, but that's unnecessary anyway. Seriously, just do
$http.jsonp('http://ec2-23-22-142-91.compute-1.amazonaws.com:1337/bbo.jsonp')
and that should work.

On Mon, Aug 5, 2013 at 9:24 PM, Cesar Devers notifications@github.comwrote:

function historicaldatacontroller in showhidecontroller.js has what i
believe to be a valid jsonp request but i get a 404 in the console.
thoughts?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1
.

$http.jsonp('http://ec2-23-22-142-91.compute-1.amazonaws.com:1337/bbo.jsonp')
does not work, you need to have the callback added so angular and work its
magic. You, however, were right about the missing question mark! All
better.

On Mon, Aug 5, 2013 at 10:08 PM, Valeri Karpov notifications@github.comwrote:

var url='
http://ec2-23-22-142-91.compute-1.amazonaws.com:1337/bbo.jsonpcallbac
k=JSON_CALLBACK';
$http.jsonp(url).success(function(data) {
console.log(data);
});

Come on Cesar, does that really look like a valid jsonp request to you?
Would I seriously define a route GET /bbo.jsonpcallback=JSON_CALLBACK? I
think you're missing a ?, but that's unnecessary anyway. Seriously, just
do
$http.jsonp('
http://ec2-23-22-142-91.compute-1.amazonaws.com:1337/bbo.jsonp')
and that should work.

On Mon, Aug 5, 2013 at 9:24 PM, Cesar Devers notifications@github.comwrote:

function historicaldatacontroller in showhidecontroller.js has what i
believe to be a valid jsonp request but i get a 404 in the console.
thoughts?


Reply to this email directly or view it on GitHub<
https://github.com/vkarpov15/tidbits-js/issues/1>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-22154082
.