Trying to do a simple JSONP request in Angular 2:

this.jsonp.request("https://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=jsonp_callback", { method: 'Get' })
        .subscribe((res) => {
          console.log(res.json());
        });

Returns

enter image description here

I think it may be an issue with the feed? Maybe starting with "/**/"?

Because both

http://chartapi.finance.yahoo.com/instrument/1.0/NFLX/chartdata;type=quote;range=1d/json?callback=JSONP_CALLBACK

http://google-code-updates.blogspot.com/feeds/posts/default?alt=json-in-script&callback=myFunc

Works just fine

share|improve this question
    
Have you tried with JSONP_CALLBACK as the callback, instead of jsonp_callback? – JB Nizet 23 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.