I am having a strange problem and could not figure out how to solve it.I am using webservice from my mobile application to authenticate login details and for that application sends a $_POST data to my api and api returns the data.
Now same code seems to work fine through my mobile but if i test it in postman it doesnt work and my file_get_contents ( "php://input" ) do not return any data.
here is the chunk of code which is not working on my localhost and on server,but the same code works fine on my application. If i request through application than it authenticates the data and let the user log in.
public function getPostdata() {
$post = file_get_contents ( "php://input" );
$data = CJSON::decode ( $post, true );
return $data;
}
php://input?$post,i tried using debugger butfile_get_contents ( "php://input" )returnsnull.