The first link doesn't use the jsonp method. Is that the recommended way to do a JSONP request is to use GET rather than the jsonp method? If I try that then I get an error that no 'Acess-Control-Allow-Origin' header is present. It seems that the post must have some additional server side options that are not spelled out. It was a good start though.
On Friday, March 4, 2016, András Csányi <[email protected]> wrote: > Hi, > > Have you met these answers and their question? > > > http://stackoverflow.com/questions/19916362/angularjs-how-to-make-a-jsonp-request > > > http://stackoverflow.com/questions/2887209/what-are-the-differences-between-json-and-jsonp > > Thanks, > > András > > - - > -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu -- > http://facebook.com/andras.csanyi > -- ""Trust in God and keep your gunpowder dry!" - Cromwell > > On 4 March 2016 at 17:52, Kevin Burton <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > >> I have a request like: $http.jsonp(" >> http://localhost:28017/...?format=jsonp&callback=JSON_CALLBACK"). Which >> I understand returns a promise so I have then(function(data) { ... to be >> called when the promise is resolved. The problem is that when I am call >> this I get an error 'Uncaught SyntaxError: Unexpected token :' that I >> notice in the debugger (Chrome) I notice that when I click on the details >> of this link I don't get JavaScript code but I get a JSON object that seems >> like the data I expect. So I am not sure what is the syntax error? Ideas? >> >> Thank you. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <javascript:_e(%7B%7D,'cvml','angular%[email protected]');>. >> To post to this group, send email to [email protected] >> <javascript:_e(%7B%7D,'cvml','[email protected]');>. >> Visit this group at https://groups.google.com/group/angular. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/QQzwdLTl2AA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <javascript:_e(%7B%7D,'cvml','angular%[email protected]');>. > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
