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

Function withJsonpSupport

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

Source from the content-addressed store, hash-verified

243 * @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.
244 */
245export function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport> {
246 return makeHttpFeature(HttpFeatureKind.JsonpSupport, [
247 JsonpClientBackend,
248 {provide: JsonpCallbackContext, useFactory: jsonpCallbackContext},
249 {provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true},
250 ]);
251}
252
253/**
254 * 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