network.request with post body is not working

I am trying very simple example as below

headers = {}  
  
headers["Content-Type"] = "application/json"  
headers["Accept-Language"] = "en-US"  
   
body = "This is an example request body."  
   
local params = {}  
params.headers = headers  
params.body = body  
  
network.request(url, "POST", ajaxListen, params)  

However following is the request on the server side. See body is completely missing. What am I missing?

[I 120210 01:23:57 mobile:348] HTTPRequest(protocol=‘http’, host=‘192.168.11.10:8091’, method=‘POST’, uri=’/login’, version=‘HTTP/1.1’, remote_ip=‘192.168.11.3’, body=’’, headers={‘Content-Length’: ‘0’, ‘Host’: ‘192.168.11.10:8091’, ‘Accept-Language’: ‘en-us’, ‘Accept-Encoding’: ‘gzip, deflate’, ‘Connection’: ‘keep-alive’, ‘Accept’: ‘*/*’, ‘User-Agent’: ‘Corona%20Simulator/2012.741 CFNetwork/520.2.5 Darwin/11.2.0 (x86_64) (Macmini5%2C1)’})

[import]uid: 7499 topic_id: 21688 reply_id: 321688[/import]

Is there a way I can get the code for network package? I could probably debug myself.

All the GET s are working fine but for POST s, basic examples are failing.

thanks
[import]uid: 7499 topic_id: 21688 reply_id: 86179[/import]

Just to report, I resolved this and was kinda tricky.

So key is to make sure your listener is defined before the request function/call. Though I am making the request in another function, I didn’t realize it is important to have listeners declared upfront.

It would have been useful if there was some kinda of message.

Let me know if I should file a bug - as network.request is simply dropping the body if listener is not defined upfront.

thanks [import]uid: 7499 topic_id: 21688 reply_id: 86236[/import]

Is this a PHP script?
[import]uid: 19626 topic_id: 21688 reply_id: 86240[/import]