Welcome Guest, Not a member yet? Register   Sign In
A post from android with data gives 404 error
#1

Dear All,

I have a recurring problem that has stalled me for 2 weeks now. An upload of a json from an android app returns an error 404 when it calls a code igniter controller function.

Initially i assumed it was an issue with the app and after updating eclipse, changing to android studio and changing laptops and changing libraries the problem persisted.

I then concentrated on the server and realised that a direct simple php script works but a code igniter controller does not. I upgraded CI from 2.1.2 to 3.0.4 and it still returns 404. This only happens if the post had parameter values. if the post has no values it returns 200.


Code:
Simple php that works

<html>
     <body>
        Welcome
       <?php
           echo $_POST["email"];      
       ?>
    </body>
 </html>

CI code that does not work

public function __construct() {
       parent::__construct();
       //$this->load->model('Index_Model','im');
   }

public function post()
{
   echo $this->input->post('email');
}
Reply


Messages In This Thread
A post from android with data gives 404 error - by muchemi - 02-10-2016, 06:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB