Response with status: 0 for url null

async prosesRegister(){
this.register.action =“register”;
let type = “application/json; charset=UTF-8”;
let headers = new Headers();
let url = “https://****.com/trial/reg.php";
headers.append(‘Access-Control-Allow-Origin’ , '
’);
headers.append(‘Access-Control-Allow-Methods’, ‘POST, GET, OPTIONS, PUT’);
let options = new RequestOptions({ headers: headers });
//this.http.post(“http://localhost/trial/loginreg.php”,this.register,options).subscribe((res)=>{
this.http.post(url,this.register,options).subscribe((res)=>{
//console.log(res)
//console.log(res.json);
/
if (typeof res["_body"] === ‘string’)
{ // let result = JSON.parse(res["_body"]);
let resstr = JSON.stringify(res);
let result = JSON.parse(resstr);}
/
//console.log(”_body");
let result = JSON.parse(res["_body"]);
//console.log(“Parsing JSON”);
//console.log(result);
// let result = JSON.parse(res["_body"]);
if(result.status == “success”){
//if(res.status=200){
this.router.navigate([’/loading’]);
this.showToast(“Your Account Is Created Successfully”);
console.log(“Inserted successfully”);
}
else{
this.showToast(“Something went wrong”);
}
}, err=>{
console.log(err);
})
}

I didn’t understand your doubt!