I am appending the headers in angular service request but the value is not appending correctly, I was created one Interceptor to add header like below
@Injectable()
export class AddHeaderInterceptor implements HttpInterceptor {
constructor() {}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
// Clone the request to add the new header
const clonedRequest = req.clone({ headers: req.headers.set('tenantId', 'r 123') });
// Pass the cloned request instead of the original request to the next handle
return next.handle(clonedRequest);
}
}
While i am sending to server the value not appending correctly, it's showin like in below picture, the value 'r 123' is not appending, How do i solve it?