Closed gbluv closed 7 years ago
Please follow readme page, from there you can deduct:
httpInterceptor.request().addInterceptor((data, method) => {
const headers = getHttpHeadersOrInit(data, method);
headers.set('X-Custom-Header', 'value');
return data;
});
Thanks, actually it was not very intuitive, you do mention that there is a getHttpHeadersOrInit but its hard to figure out where it should go. You might consider adding this specific example for better clarity.
Thanks again.
-Greg.
Yeah maybe you are right, I just wanted not to bloat readme with extra examples to keep it as much clean as possible (since there are already a lot of code). Will this small example just to show how to use helper functions =) Thanks
Is there a way to append headers via intercepter?
Thanks.