For versions of RxJS 6.x.x and above, you will have to use pipeable 
operators.
Try this:
 return this._httpService.get("http://localhost:7777/webapp/user";)
               .pipe(map((response: Response) => response.json()))
               .catch(this.handleError);



On Monday, March 2, 2020 at 1:50:33 PM UTC+7, William Manley wrote:
>
> import { Injectable } from '@angular/core';
> import { Http, Response, Headers, RequestOptions } from '@angular/http';
> import { Observable } from 'rxjs';
> import { User } from './user';
> import 'rxjs/add/operator/map';
> import 'rxjs/add/operator/catch';
>
>
> @Injectable()
> export class UserService{
>    
>    constructor(private _httpService: Http){}
>     getAllUsers(): Observable<User[]>{
>        return this._httpService.get("http://localhost:7777/webapp/user";)
>                .map((response: Response) => response.json())
>                .catch(this.handleError);
>    }
>
>     private handleError(error: Response){
>        return Observable.throw(error);
>    }
>
> }
>
> Error: Property 'map' does not exist on type 'Observable<Response>'.
> ts(2339)
>
> Angular CLI: 9.0.4
> Node: 12.16.1
> OS: win32 x64
>
> Angular: 9.0.4
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/6d56bc9d-5671-411a-bb08-f1a6f69ac528%40googlegroups.com.

Reply via email to