I am making some POST requests using POSTMAN as follows:
This is using POSTMAN and it works just fine. Following is also from POSTMAN
POST /supervisor/stop/process HTTP/1.1
Host: bento
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 66b05631-8b4e-473a-9d3f-deaa544ecac6
{
"ip" : "192.168.1.115",
"port" : "9001",
"process" : "public_video_convert:video_convert_01"
}
I tried the same thing using Angular 2 as follows:
let url = "http://bento/supervisor/stop/process";
let data = {
"ip": "192.168.1.115",
"port": "9001",
"process": "public_video_convert:video_convert_01"
}
let body = JSON.stringify(data);
let head = new Headers({
'Content-Type': 'application/json'
});
this.http.post(url, body, {headers : head})
.map(res => res.json())
.subscribe(
data => {console.log(data);},
err => console.log(err),
() => console.log('Fetching complete for Server Metrics')
);
When I run this, I get a 405 Method Not Allowed
The details of the request and and the response from dev tools is as follows:
I am not sure how to handle this.


PreFlightrequest is failing. Do you control the server?HTTP OPTIONSreqyests might not have been enabled there.