WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
JSON API returning no response (3 posts)

  1. risingtiger
    Member
    Posted 2 years ago #

    I am working to get the json api plugin working properly on a fresh install of wordpress.

    I am using jquery to instigate a json request and Firebug is reporting that the request is in fact sent, but there is absolutely no response. Firebug is displaying the GET request in red in the console with a status code of 200 OK. Its kinda bizarre. I've tested to make sure I can make other json requests and they come through fine.

    The jquery I'm using is this:

    $.ajax({
    url: "wordpressinstall/?json=1",
    dataType: "json",
    success: function(data) { console.log(data); }
    });

    Has anybody experienced a similar problem?

    http://wordpress.org/extend/plugins/json-api/

  2. risingtiger
    Member
    Posted 2 years ago #

    Alright. I believe I've found the answer to my dilema here.

    I have wordpress installed in a directory underneath the main domain aka: wilfordwelch.com/wordpressinstall. I had created a page under the main domain (wilfordwelch.com/blog_titles) which was outside of the wordpress system. But I was using javascript to call into wordpressinstall.

    Apparently, a fit is thrown when this happens. Apparently, if your going to make json requests you must be within the same directory. The exception, I assume, is if you use jsonp with a callback.

  3. risingtiger
    Member
    Posted 2 years ago #

    Or, another option is to set uri handling to default in wordpress and stick with the example.com/?json=1, etc, etc approach.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags