My code
let body : string = "key=insert&name=" + this.name + "&email=" + this.email + "&post=" + this.post,
type : string = "application/x-www-form-urlencoded; charset=UTF-8",
headers : any = new Headers({ 'Content-Type': type}),
options : any = new RequestOptions({ headers: headers }),
url : any = "/var/www/html/ionic/myApp/src/app/add-data.php";
this.http.post(url,body,options)
.subscribe((data) => {
console.log(JSON.stringify(data));
})
is the above code correct I am getting error like
android response-> console.error: ERROR
[object Object]
web-error response -> body: "Cannot POST /var/www/html/ionic/myApp/src/app/add-data.php 404 not found if I copy thislink on web it will directly download the file