javascript - Polymer core-ajax cross domain issue -
I am trying to make a cross domain call using polymers and components. I'm not coming back 'access-control-permission-generation' header on request processing is not present. My code for component is below
& lt; Core-ajax id = "ajax" auto url = "http://api.meetup.com/2/event_comments/?key=MyKey& event_id=191593992 & amp; callback =" on-core-response = "{{ Commentsloaded}} "method = 'received' contentType = 'text / javascript' handleAs =" json "& gt; & Lt; / Core-ajax & gt; If I use jQuery and the following snippet, then it works
$ .getJSON ('http: //api.meetup. Com / 2 / event_comments /? Key = mikey and event_id = 1 915 939 & amp; callback =? ') So my question is, is there magic magic that is not polymer and how do I get around it Do you? I've checked the console and everything looks the same (headers, paramet etc.).
As the appropriate name suggests in the comment above Jason P, you can use polymer-jsonp here Are there.
& lt; Polymer-jsonp auto url = "http://api.meetup.com/2/event_comments/? Key = MyKeyc & amp; event_id = 191593992 & amp; callback =" on-polymer-response = "{{commentsloaded}}" & Gt; & Lt; / Polymer-jsonp & gt;
Comments
Post a Comment