I am using angular-cli with proxy to send my requests to backend. My backend runs locally on port 5000 and angular application runs of default port 4200. Everything is fine for GET requests, however all my POST requests made with HttpClient are being sent as GET requests.
Other methods, like PUT, PATCH and so on works as expected.
My proxy configuration:
{
"/api/*": {
"target": "http://localhost:5000",
"secure": false
}
}
If anyone could explain why that is happening and If I'm using proxy correctly, I would be grateful.
EDIT:
Request is being made with service method:
logout(): Observable<any> {
return this.http.post('api/v1/user/logout', {});
}