I am using network.request to try to talk to a server, via https POST, with a self signed certificate. What kind of response should I be expecting?
I have the headers and payload set to what the server should be expecting based on their documentation. Here is the code I have handling the event:
[lua]local function networkListener( event )
print( "listener start" );
if ( event.isError ) then
myText.text = "Login Failed!!"
print( "Network error!")
for key , value in pairs(event) do
print("Key " .. key .. " value " .. tostring(value))
end
else
myText.text = "Login Successful!"
print ( "RESPONSE: " .. event.response )
end
print( "listener end" );
end[/lua]
The output I get from that is:
[text]
listener start
Netowrk Error!
Key isError value true
Key url value —the url—
Key name value networkRequest
Key response value
listener end
[/text]
So, essentially, I’m not getting any indicator from the server as to what is wrong. Not sure if its because of the self-signed certificate or whether something else is wrong.
The other thing that is somewhat confusing is that based off of the networkRequest events I would expect that there is also event values for status, but that comes up nil and crashes if I try to reference it…
Any help is greatly appreciated.
Thanks! [import]uid: 159173 topic_id: 32864 reply_id: 332864[/import]