0

I have tried

getRSSFeed(url) {
    return this.http.get('https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=' + encodeURIComponent(url), { headers: this.header2 })
      .map((res) => res.json());
  }

I am getting 200 status and getting error

XMLHttpRequest cannot load https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=http%3A%2F%2Fblog.example.com%2Ffeed. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

I like to fetch as json format so i have used like this https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&q=http://blog.example.com/feed

Deepak
  • 1,373
  • 2
  • 10
  • 31

0 Answers0