• Genel Bakış
@angular/common/http

JsonpInterceptor

Sınıf
kullanımdan kaldırılmışv22.1'den beri

Identifies requests with the method JSONP and shifts them to the JsonpClientBackend.

Deprecation warning

JSONP is deprecated as it can cause XSS vulnerabilities. Use standard HTTP requests instead. Intent to remove in future versions of Angular.

API

    
      class JsonpInterceptor {}
    
    

intercept

Observable<HttpEvent<any>>

Identifies and handles a given JSONP request.

@paraminitialRequestHttpRequest<any>

The outgoing request object to handle.

@paramnextHttpHandler

The next interceptor in the chain, or the backend if no interceptors remain in the chain.

@returnsObservable<HttpEvent<any>>

An observable of the event stream.

Detaylara atla