I’m sending a basic post request to my backend. All others request are working fine, but in this specific & new case, I’m getting a strange error:
node:_http_outgoing:659
throw new ERR_HTTP_HEADERS_SENT('set');
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ClientRequest.setHeader (node:_http_outgoing:659:11)
at setOriginHeader...
I’m using Angular 18 , node 20.15.0 and I’m behind a proxy. My code in service:
sendData(id, data):Observable<any>{
return this.http.post(`${environment.url}/${id}`, data);
}
Can be this a backend issue? Read that multiple responses could be send and that’s why this error is raised.