I trying to log my native-angular applications log in influxdb which is installed on my server. whlie posting log to server API is succeeding and return 204 status code along with the error. for this i have refer many answers like this but not working me .
error:
{
JS: "headers": {
JS: "normalizedNames": {},
JS: "lazyUpdate": null,
JS: "headers": {}
JS: },
JS: "status": 204,
JS: "statusText": "Unknown Error",
JS: "url": null,
JS: "ok": false,
JS: "name": "HttpErrorResponse",
JS: "message": "Http failure during parsing for (unknown url)",
JS: "error": {}
JS: }
API Call :
const req = `spl.hpft AppComponent="testing",Message=" ${error.message ? error.message : null}",Error="${error.toString()}"`;
const headers = new HttpHeaders().set('Content-Transfer-Encoding', 'binary');
console.log('influxdb request sent');
this.httpClient.post(InfluxDb_Log, req, {headers:headers,responseType:'text' }).subscribe(payloadResponse => {
console.log('payloadResponse', payloadResponse);
console.log('influxdb response received', payloadResponse);
}, error => {
console.log('influx error', error);
});