import { AppErrorHandler } from './../common/app-error-handler';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { DataService } from './data.service';
import { Injectable } from '@angular/core';
import { catchError } from 'rxjs/operators';
import { Observable, throwError } from 'rxjs';
import { Router } from '@angular/router';
import { kMaxLength } from 'buffer';
@Injectable({
providedIn: 'root'
})
export class IlceService extends DataService {
constructor(private http:HttpClient, private router: Router) { super(http,"/app/ilce",router) }
getIlcesByIlId(pIl:string):Observable<any>{
var headers = new HttpHeaders({
'Content-Type':'application/json',
});
return this.http.get(this.backEndAddress.concat('/by/il/',pIl),{headers})
.pipe(
catchError(err=>throwError(AppErrorHandler.createAppError(err,this.router)))
);
}
}
ilce.service.ts sends user information outside the application. This may constitute a Privacy Violation
return this.http.get(this.backEndAddress.concat('/by/il/',pIl),{headers} is this here give me client privacy violation error there are many different kind of methot but not find correct method. how to correct this code write?unexpected violation error ;
please help thank you very much.