microsoft / kiota-typescript

TypeScript libraries for Kiota-generated API clients.
https://aka.ms/kiota/docs
MIT License
37 stars 27 forks source link

How to add header to all requests? #1233

Closed illunix closed 3 months ago

illunix commented 3 months ago

Hello, how can I add custom header that will be included in every request?

baywet commented 3 months ago

By implementing a custom handler like this one let us know if you have further questions

illunix commented 3 months ago

And then how to use it in my client? Also I just want use accepted-language header so maybe there is any support somewhere?

baywet commented 3 months ago

We actually have documentation about that! (we put a lot of efforts filling the documentation gaps recently and it's nice to be able to say that) See this, the examples are in CSHarp but if should be easy to transpose.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.