top of page

Using Context to add meta to API calls in Angular 12+

  • Writer: Benjamin Pfohl
    Benjamin Pfohl
  • Jan 17, 2024
  • 1 min read

We just had a case for this when trying to add a publicly available page that needed to call the API without any auth headers.  The problem was that the HTTP Interceptor kept picking up all of the calls and I didn't want to add route specific logic to the interceptor.


But I found this through a Goog search ->

I can register a token:


ree

And then I can add it to may httpClient call in the service:


ree

And voila - no more auth headers in the call.



 
 
 

Recent Posts

See All

©2025 Logic Factory LLC

bottom of page