Defjs
Core

InterceptorFn

HTTP interceptor function: may inspect or modify the request, then call next.

@defjs/core · Type

Signature

type InterceptorFn = (
  req: HttpRequest,
  next: HttpInterceptorNext,
) => Promise<HttpResponse<unknown>>;

Call next(req) or short-circuit with makeResponse. Wrap it with createHttpInterceptor to register it.

Parameters

Prop

Type

req HttpRequest
next HttpInterceptorNext
Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao