Http get request

i m trying to read the json file but im getting an error saying “Cannot read property ‘get’ of undefined”

this is the code:

var GetCountryName = pc.createScript('getCountryName');

// initialize code called once per entity
GetCountryName.prototype.initialize = function()
{

    
    pc.https.get("https://restcountries.eu/rest/v2/all",function(err,data)
                {
                    console.log(data);
        
                });
};

// update code called every frame
GetCountryName.prototype.update = function(dt) 
{
    
};

It’s pc.http not pc.https :slight_smile:
https://developer.playcanvas.com/en/api/pc.Http.html#get

thanks