I am getting an error like this. Couldn't find the solution.
login(signInRequestPayload: SignInRequestPayload): Observable<boolean> {
return this.httpClient.post<SignInResponse>( '/api/v1/registration/login', signInRequestPayload)
.pipe(map(data => {
this.localStorage.store('token', data.token);
return true;
}));
}
You might be receiving text as the response type, but by default Angular expects JSON. Try setting {responseType: 'text'}
in the options
of the call