MCPcopy Index your code
hub / github.com/angular/angular / jsonpInterceptorFn

Function jsonpInterceptorFn

packages/common/http/src/jsonp.ts:302–312  ·  view source on GitHub ↗
(
  req: HttpRequest<unknown>,
  next: HttpHandlerFn,
)

Source from the content-addressed store, hash-verified

300 * Identifies requests with the method JSONP and shifts them to the `JsonpClientBackend`.
301 */
302export function jsonpInterceptorFn(
303 req: HttpRequest<unknown>,
304 next: HttpHandlerFn,
305): Observable<HttpEvent<unknown>> {
306 if (req.method === 'JSONP') {
307 return inject(JsonpClientBackend).handle(req as HttpRequest<never>);
308 }
309
310 // Fall through for normal HTTP requests.
311 return next(req);
312}
313
314/**
315 * Identifies requests with the method JSONP and

Callers 1

interceptMethod · 0.85

Calls 3

injectFunction · 0.90
handleMethod · 0.65
nextFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…