how could I use Jquery to make a post request to the fandom's API and get data from the request's responseJSON?
When I use this code:
$.post(
"https://drednotio.fandom.com/api.php",
{
action: "query",
format: "json",
list: "allpages",
apfrom: "a",
aplimit: "500",
token: "fa5fed4cd6bdb8bd8b901075ec59fa39+\\",
bot: "true",
},
function (data) {
var response = jQuery.JSON.parse(data);
console.log(data);
}
);
I get this error in the console:
I've tried using xmlhttprequest and ended up with the same results... Could someone help me out?