For people having issues with lua-socket not working correctly even after it's installed, a fix for your Newsnet terminal is to start your newsnet screenplay off with:
package.cpath ="/usr/lib/x86_64-linux-gnu/lua/5.3/?.so;" .. package.cpath
package.path = "/usr/share/lua/5.3/?.lua;" .. package.path
local http = require("socket.http")
Issue appears to be certain paths being missing from the lua's defaults. This will manually add them so the screenplay can access lua-socket.