You declare a class as an interceptor in Angular by implementing the HttpInterceptor interface.
An interceptor will transform the client requests and responses from the server.
References:
https://angular.io/guide/http#intercepting-requests-and-responses