I am working with a mobile api which sends this data by POST
:
@Injectable()
export class UsuarioProvider {
datos: any;
api: string = 'http://10.5.10.230/TaxisPlu/moviles/app_cliente/registrar_usuario/';
constructor(public http: Http) {
console.log('Hello UsuarioProvider Provider');
}
crear_usuario(datos) {
let body = datos;
let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
headers.append("Accept", 'application/json');
return this.http.post(this.api, body, {
headers: headers,
method: "POST"
}).map(
(res: Response) => { return res.json(); }
);
}
}
And it is received by a controller
public function registrar_usuario() {
///COMO LEER ESA INFORMACION
}
My question is how to read the Form Data in my PHP. Thanks