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

Method jsonp

packages/common/http/src/client.ts:1493–1499  ·  view source on GitHub ↗

* Constructs an `Observable` that, when subscribed, causes a request with the special method * `JSONP` to be dispatched via the interceptor pipeline. * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain * API endpoints that don't support newer, *

(url: string, callbackParam: string)

Source from the content-addressed store, hash-verified

1491 * @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.
1492 */
1493 jsonp<T>(url: string, callbackParam: string): Observable<T> {
1494 return this.request<any>('JSONP', url, {
1495 params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
1496 observe: 'body',
1497 responseType: 'json',
1498 });
1499 }
1500
1501 /**
1502 * Constructs an `OPTIONS` request that interprets the body as an

Callers 3

provider_spec.tsFile · 0.80
client_spec.tsFile · 0.80
constructorMethod · 0.80

Calls 2

requestMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected