import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; import { Injector } from '@angular/core'; import { NecAuthService } from '../auth/auth.service'; import { Observable } from 'rxjs'; /** * Http Request拦截器, 用于给登录后发送的请求头自动添加Authorization字段 */ export declare class AuthInterceptor implements HttpInterceptor { private injector; authService: NecAuthService; /** * 注入NecAuthService(异步是防止初始化报错) */ constructor(injector: Injector); /** * 实现接口 */ intercept(req: HttpRequest, next: HttpHandler): Observable>; }