I am sending form data to a api which is running in python flask. The form is in angular 11. When using httpclient the api is not accessible.
this.http.post('http://192.168.0.95:5001/login', formData).subscribe(
(response) => console.log(response),
(error) => console.log(error)
)
But when i directly submit the form to that api its working.
<form action ="http://192.168.0.95:5001/login">
I have updated the proxy.conf.json file as below
{
"/": {
"target": "http://localhost:3000",
"secure": false,
"logLevel": "debug"
}
}
but its not working. Anyone please help with this