I am currently working on a project that requires a login screen which would need to authenticate with a website via username/password.
I tried the following to try to send the username and password but the event response was just the HTML from the website I pointed to.
local function networkListener( event ) if ( event.isError ) then print( "Network error: ", event.response ) else print( "RESPONSE: " .. event.response) end end local params = {} local headers = {} headers["Content-Type"] = "application/x-www-form-urlencoded" params.formdata = "username=user&password=pass" params.headers = headers network.request("https://example.com/login", "POST", networkListener, params)
Is there any way to authenticate with a website this way?