I am trying to send a simple string as Queryparameter with a GET request in Angular 9. The string contains special chars like +
by example
getString(stringParam: string): Observable<boolean> {
console.log('api param', stringParam);
let params = new HttpParams();
params = params.set('stringParam', stringParam);
return this.http.get<boolean>(`${URL}/param`, { params });
}
the console log shows me PL + QP/2 but the query param is send like PL QP/2 in the headers.
So for some reason it drops the + (and probably some other chars also, not confirmed) And I got no clue why, does anyone has a lead on this? I tried playing with the URI encoding, but I did not succeed.
Thanks in advance.