Having Issues with NUI Callback (Lua/JS)

My javascript is as follows:

console.log(comp + ' was updated to '+value);
$.post('http://clothing/change', JSON.stringify({
	comp: comp,
	value: value
}));

This code is successfully triggered as I get the console message. However, the following LUA doesn’t get triggered:

RegisterNUICallback('change', function(data, cb)
    print('test')

    cb('ok')
end)

I figured out this issue for anyone else who may come across this thread. Stupidest mistake, needed to put https instead of http

1 Like

Dude, I’ve been looking over my code for hours and couldn’t find anything wrong with it. Who would have known it would be a simple fix like this!