I'm encountering an issue in my Angular v12 project where I receive the error message
Cannot find module '@angular/http/src/static_response' or its corresponding type declarations
when I attempt to use the import statement in my code: import { Response } from "@angular/http/src/static_response";
. Strangely enough, this import statement was functioning correctly in my Angular v4 project.
getClientMasterData(): Observable<any> {
return this.http.get(x.getBaseURL() + "/ClientMaster/GetMasterData", this.getHeader.get())
.pipe(map((response: Response) => <MasterDataModel[]>response.json())
,catchError(this.handleError));
}
Although I am aware that http
has been relocated to @angular/common
, I am unable to locate either the src
folder or the static_response
file within @angular/common
.
Any assistance in resolving this issue would be greatly appreciated.