angular change query params for httpClient using rxjs code example

Example 1: angular http request query params

request(query) {
  let params = new HttpParams().set("keyword", query);
  return this.http.get(`Your_URL`, {params});
}

Example 2: angular httpclient query params not working

getLogs(logNamespace): Observable<any> {

    // Setup log namespace query parameter
    let params = new HttpParams().set('logNamespace', logNamespace);

    return this._HttpClient.get(`${API_URL}/api/v1/data/logs`, { params: params })
}