Q:

Angular 5: get method with params and observe response

I want to make a get request with params and observe the whole response object instead of the body. But the get method only accepts two arguments. How can I achieve this?
const params = new HttpParams().set('q', 'cironunes');

this.http.get(server_utl, { params }, {observe:response});

A:

The second parameter accept options which can have params and observe. So you can pass your data like this
this.http.get(server_utl, { params, observe: 'response' });

This is the signature of the method get 
get(url: string, options: {...}): Observable<any>

and what can accept the options paraneter
headers?: HttpHeaders | {
    [header: string]: string | string[];
};
observe?: HttpObserve;
params?: HttpParams | {
    [param: string]: string | string[];
};
reportProgress?: boolean;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean

