0
    function Get_Platforms() {
        $.ajax({
            xhrFields: { cors: false },
            type: "GET",
            url: "http://10.64.127.94:5000/api/get_platforms",
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            success: function (data) {
                alert(data);
            },
            error: function (x, y, z) {
                alert(x.responseText + "," + x.status);
            }
        });
    }

http://10.64.127.94:5000/api/get_platforms

{
    "final_result": [
        "THORIUM",
        "RADIUM",
        "URANIUM",
        "THALLIUM"
    ]
}

I am getting undefined error when the page loads and cant see the response.

Akshay J
  • 5,362
  • 13
  • 68
  • 105
  • Does this answer your question? [How do I return the response from an asynchronous call?](https://stackoverflow.com/questions/14220321/how-do-i-return-the-response-from-an-asynchronous-call) – evolutionxbox Feb 23 '23 at 15:34
  • Do you actually have access to `10.64.127.94:5000`?? – underflow Feb 23 '23 at 17:10

0 Answers0