I want to send the data to back-end for creating the details about customers using http post method with API URL. But it refused to connect the back-end. because it need some permission for access the post method. please give some guide line and resolve this error.
i already do some changes in app.setting for Allow-permission-* in back-end side. but nothing happend.
//This is my ts code
this.http.post('http://localhost:2401/api/CustomerAPI',
jstring).map(res => res.json()).subscribe(data => {
console.log(data)
}, (err) => {
console.log(err)
});
}
Access to XMLHttpRequest at 'http://localhost:2401/api/CustomerAPI' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Then it also show Failed to load resource: net::ERR_CONNECTION_REFUSED