# 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.

```typescript
@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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gapvelocity.ai/webmap/general/frontend/documentation/angular-client/webmap-interceptor-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
