* 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)
| 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 |
no test coverage detected