![]() |
Read JSON response from Ext JS giving boolean false?! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Read JSON response from Ext JS giving boolean false?! (/showthread.php?tid=44380) |
Read JSON response from Ext JS giving boolean false?! - El Forum - 08-12-2011 [eluser]CI_adis[/eluser] Hi all, I'm stuck with something... I tried to integrate Ext JS with CI and it works well. But when I submit something from Ext JS it returns a JSON object and I cannot read the content in my CI controller. The JSON is: Code: { But when I want to read this in my controller: Code: var_dump($this->input->post()); It is giving me the error: Quote:<pre class='xdebug-var-dump' dir='ltr'><small>boolean</small> <font color='#75507b'>false</font> The complete function in my controller: Code: function update_all_tasks() What can this be, I cannot find anything else that is weird?? If I create a test.html with one textfield and enter my json in that field I can read the response... Read JSON response from Ext JS giving boolean false?! - El Forum - 08-12-2011 [eluser]SlavomirJ[/eluser] False means that Your POST request is empty. Try to check if You are actually getting any date by checking $_REQUEST variable, maybe result is a GET reqest? ![]() Read JSON response from Ext JS giving boolean false?! - El Forum - 08-12-2011 [eluser]CI_adis[/eluser] Hi slavomir, This is my request: Code: Request URL:http://localhost:8888/app/index.php/process_tasks/update_all_tasks?_dc=1313184225354 Code: Accept:*/* And in the request payload I see the JSON as mentioned in first post.. So my request is not empty, right?? Read JSON response from Ext JS giving boolean false?! - El Forum - 08-13-2011 [eluser]CI_adis[/eluser] I can read the JSON when I use this: Code: $result = NULL; sow this is not working: Code: var_dump($_POST); Code: var_dump($this->input->post()); Code: file_get_contents('php://input') |