WebMap Interceptor Service

The WebMAPInterceptor service is used to intercept http request to handle special logic required for WebMAP WebAPI Requests.

How it works

You can create an interceptor for any request of Angular. Any interceptor that you want to create needs to implement the HttpInterceptor interface. Using interceptor is all about changing outgoing request and incoming responses. If you want to make a change in the request, we need to clone the original and modify the new request.

@Injectable()
export class WebMapInterceptor implements HttpInterceptor {
     ...
}

WebMap WebAPI may require a change to the request of Angular. The application can handle a Pending Response or WebApiHeader.

The PendingResponseHeader is used to mark that has a pending response that must be retrieved from the server. When the request is created, the core client add a new key/value in the header of the request, called WM-Pending= where the id is the request id in the server side used to recover the changes that should be send in the response.