AngularJS Wordpress JSON API Plugin returning html instead of json

I'm trying to get recent posts from my wordpress blog but it's returning html instead of json. I want to use json to make it easier to access the blog contents. I already have the plugin installed and activated. Here's what I do to get the posts:

  .success(function(data, status, headers, config){
      $ = data;
  .error(function(data, status, headers, config){-
      console.log("unable to access!!!!!!!!!!!");

What's the reason that it's returning html instead of json? Are there any workarounds? Some other posts mentioned using jsonp but that did not work for me either.



I'm likely doing it wrong, but when I form my requests for a Wordpress installation at like this:

I end up getting proper responses back.

I had a heck of a time figuring this out and ended up grokking a URL formatted like that in the HTML returned to me. I was expecting to make requests as , but I only got HTML responses.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.