Answers for "exclude sppiner interceptor using url"

0

exclude sppiner interceptor using url

intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    // put this before your current code
    if (req.url.indexOf('/* the api path you want to exclude*/') === -1) {
      return next.handle(req);
    }
    // do your stuff here.
    return next.handle(req);
  }
Posted by: Guest on December-17-2020

Browse Popular Code Answers by Language