How to configure HttpClient in Azure functions

Like many I'm using the HttpClient in some of my Azure functions (v3.x). The issue is that Azure function host uses the HttpClient as a singleton. This means that if I set the headers in one function they're set for all functions. I want to have different headers (e.g. Authorization headers) in different functions. Is the only way to accomplish this is to create different function apps for each different set of headers that I need?

Read more here:

Content Attribution

This content was originally published by HisDivineShadow at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: