Hi All
Need solution
All these days worked only on http now I am using https
but I am getting an ‘Access-Control-Allow-Origin’ Error
checkOrganiserLogin(username, password) {
var hostname="companyname";
var body = "&username=" + username + "&password=" + password + "&hostname=" + hostname
type: string = "application/x-www-form-urlencoded; charset=UTF-8",
headers: any = new Headers({
'Content-Type': type,
// 'Access-Control-Allow-Origin': '*',
// 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT', 'Accept': 'application/json'
}),
options: any = new RequestOptions({ headers: headers }),
url: any = "https://www.bizcentra.com/app/index.php?action=login";
//action=login&username=Thiruppathi&password=sanj123&hostname=omkarsoft
var response = this.http.post(url, body, options).map(res => res.json());
return response;
}
This is my code I am getting an Error
Failed to load https://www.bizcentra.com/app/index.php?action=login: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8100’ is therefore not allowed access.
If anyone knows how to get response from https please let me know