Is there a way to save and pass the data received from an API to a URL in Angular?
SERVICE.ts
readonly apiUrl = 'http://localhost:49940/';
constructor(private http: HttpClient) { }
getUserName(): Observable<any> {
return this.http.get<any>(this.apiUrl+'api/Account/GetUserClaims');
}
get(userName: string): Observable<any> {
let newURL = `https://...?codSog=${userName}`;
return this.http.get<any>(newURL);
}