I need to develop a business application using Corona.
As far as I’m concern, it is possible to read JSON reply. but is it possible to read $_POST reply from the server as well? [import]uid: 174033 topic_id: 34342 reply_id: 334342[/import]
$_POST is a PHP Array. You would need some PHP code to output it. Corona’s network.request() can read any formatted data, just that you have the responsibility of formatting that data. In your PHP script you have to tell it how to output the data, using print_r or echo’s or whatever. You can have the PHP output XML, YAML, or any other output that you desire.
But the best thing to do is to use have your PHP script output JSON, Corona’s network.request() will read the string and then you can use Corona’s json.decode() to parse the data for you.
See this blog post:
http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/ [import]uid: 199310 topic_id: 34342 reply_id: 136524[/import]
$_POST is a PHP Array. You would need some PHP code to output it. Corona’s network.request() can read any formatted data, just that you have the responsibility of formatting that data. In your PHP script you have to tell it how to output the data, using print_r or echo’s or whatever. You can have the PHP output XML, YAML, or any other output that you desire.
But the best thing to do is to use have your PHP script output JSON, Corona’s network.request() will read the string and then you can use Corona’s json.decode() to parse the data for you.
See this blog post:
http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/ [import]uid: 199310 topic_id: 34342 reply_id: 136524[/import]