MCPcopy Create free account
hub / github.com/angular/angular / withJsonpSupport

Function withJsonpSupport

packages/common/http/src/provider.ts:251–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 * @deprecated 22.1 JSONP is deprecated as it can cause XSS vulnerabilities. Use standard HTTP requests instead. Intent to remove in future versions of Angular.
250 */
251export function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport> {
252 return makeHttpFeature(HttpFeatureKind.JsonpSupport, [
253 JsonpClientBackend,
254 {provide: JsonpCallbackContext, useFactory: jsonpCallbackContext},
255 {provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true},
256 ]);
257}
258
259/**
260 * Configures the current `HttpClient` instance to make requests via the parent injector's

Callers 2

provider_spec.tsFile · 0.90
module.tsFile · 0.90

Calls 1

makeHttpFeatureFunction · 0.85

Tested by

no test coverage detected