Need help, fivem NUI RegisterNuiCallback not working

Hey, no idea why this not working.

RegisterNUICallback("uzdaryti", function(data, cb)
      SetNuiFocus(false,false)
	  TriggerEvent("nui:off", true)
      cb()
  end)
  
$(".uzdaryti").click(function(){
    $.post('http://komandos/uzdaryti', JSON.stringify({}));
});

It should close NUI. but not working.

in my case I have to use https instead of http