gund / ng-http-interceptor

Http Interceptor library for Angular
MIT License
104 stars 16 forks source link

Requests are send twice #167

Closed bjabbar closed 7 years ago

bjabbar commented 7 years ago

Requests are sending twice

@Injectable()
export class AuthInterceptor implements IHttpInterceptor {
    constructor(private loggedInUserApi: LoggedInUserApi) {
    }

    // before sending request.
    before(request: Request): Request {
        return request;
    }

    // after getting response.
    after(res: Observable<Response>): Observable<any> {
        res.subscribe(response => this.loggedInUserApi.checkSession(response.headers));
        return res;
    }
}

Found a similar issue is fixed earlier , seems its back again

bjabbar commented 7 years ago

posted in wrong package