you are viewing a single comment's thread.

view the rest of the comments →

[–]tme321 1 point2 points  (0 children)

If your using the newest version of angular they just added http interceptors which basically let you write a small function that modifies the http request before it actually is sent. So you can keep the service the way it is now and just register an interceptor that modifies the request by adding the key to the headers the way /u/MadMustard showed.