POST request not working!

I’m trying to create a POST request following the documentationthis is what i have so far:

local headers = {} local params = {} local function networkListener(event)      if(event.isError) then         print("Network Error!")     else         print("Reponse: "..event.response)     end end  headers["Content-Type"] = "application/x-www-form-urlencoded"     --headers["Accept-Language"] = "en-US"     local body = "color=red&size=small"     params.headers = headers     params.body = body local function enviarErro(event) -- SUBMIT BUTTON     native.setKeyboardFocus(nil)     print("Enviar erro criar url aqui "..textoEnvio)     network.request( "http://perpetualmotionstudio.com/quizverdao/senderror.php", "POST", networkListener,params ) end

For some reason i always getting a empty response, but by using POSTMAN(Chrome extension), i see that everything is just working, and the problem is that my network.request is not sending the params.

this is what i have in senderror.php

\<?php echo($\_POST["color"]); echo($\_POST["size"]); ?\>

Thanks!

You might want to look at the results of this Google search:

https://www.google.com/search?q=php+post+parameters+missing&ie=utf-8&oe=utf-8

There are issues getting PHP to receive POST requests and get them into $_POST for you. You should find the solution that works for you.

Rob

Have you tried getting to the data through the $_REQUEST hash?

You might want to look at the results of this Google search:

https://www.google.com/search?q=php+post+parameters+missing&ie=utf-8&oe=utf-8

There are issues getting PHP to receive POST requests and get them into $_POST for you. You should find the solution that works for you.

Rob

Have you tried getting to the data through the $_REQUEST hash?