Anything that uses @angular/common/http is Angular 5. Angular didn't introduce interceptors until version 5, so your problem might be that you are a version behind.
Comment by Matt Strom on "How to append CSRF token in Angular 4+ post method in proper way" | Hashnode