Code: Select all
http = require("socket.http")
json = require("dkjson")
ltn12 = require("ltn12")
https = require("ssl/https")
data = "username=user&password=pass"
res, code, response_headers, status = https.request {
response_body = {} ,
method = "POST",
headers= {
["Content-Type"]="application/x-www-form-urlencoded",
["Content-Length"] = data:len()
},
url = 'https://watch.nba.com/nba/secure/login?',
source = ltn12.source.string(data),
sink = ltn12.sink.table(response_body)
}
print (response_headers["set-coockie"])
Code: Select all
Error while running script C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\nba_league_pass.lua, function (null)(): error loading module 'socket.core' from file '.\socket\core.dll': dynamic libraries not enabled; check your Lua installation
Thanks.