How to get status code in loadRemote

Hi everyone,
I want to load JsonAsset from server using assetManager like this :

assetManager.loadRemote<JsonAsset>(endpoint, { ext: '.json' }, (err, jsonAsset) => {
    if (err) {
        // failure statement
        return;
    }

    // success statement
});

Is it possible to get status code such as 200, 404, or 500 via a callback?

Thank you in advance.


You can determine the returned error, the returned err is an Error object, by indexing the error data, you can get the corresponding error code, if there is no err, then it is 200

ahh I see, I don’t know we can do like that. Thank you so much!