@budershank, thank you for letting me know. So it works with python but not with php? And you are using HTTP POST method (not HTTPS) – I know you said you are able to do this, but just to make tripple sure. I’ve been smashing my head on the wall way too long.
I’d so appreciate it if you can see any problem with the LUA/Corona portion of the code here? I know it’s a lot of trouble, but if you could help me out, I’d so appreciate it. I just can’t see what’s wrong with it. Is there something wrong with my lua code? Would this lua code work with python? Is it that Corona implementation of HTTP POST method is incompatible with PHP? What could it be so wrong with what I’m doing here?
--LUA (corona side - plug & play except for the URL):
local URL = ... -- please include valid http url here
local function networkListener( event )
if ( event.isError ) then
print( "Network error!")
else
print ( "RESPONSE: " .. event.response )
end
end
local function sendRequest(set\_email, set\_user)
local postdata = {}
local headers = {}
headers["Content-Type"] = "application/json"
headers["Accept-Language"] = "en-US"
postdata.headers = headers
local param = {}
param.username = set\_user
param.email = set\_email
postdata.body = json.encode(param)
network.request( URL, "POST", networkListener, postdata)
end
sendRequest("myemail@myweb.com", "mynickname")
-- PHP (just responding back with the data dump to see if anything is getting there)
<?php <br> echo var\_dump($\_REQUEST);
?\>
-- terminal output shows blank array
RESPONSE: array(0) {
}
Naomi [import]uid: 67217 topic_id: 29545 reply_id: 118787[/import]
Problem was the IAP did NOT work!!! OMG!!!