I have a C# function app on azure that calls another API using the HttpClient class, but it keeps timing out and I can't find how to change the timeout time from the default (I think 100 seconds or 2 minutes?). The API endpoint I'm calling is expected to take a while, it's not an issue with the API as I've confirmed the api is working ok.
I've tried changing the Timeout property of HttpClient (tried half an hour and an hour) but this doesn't do anything. Stack overflow says the timeout is defined by the server, not the code, and you need to add a executionTimeout property to the Web.config to change the max timeout; however, this is a function app that doesn't have a Web.config and the executionTimout needs an xml entry in this file, not an environment variable.
How can I increase the HttpClient timeout time? Note that my function app (v2) isn't timing out, just specifically the call to another API that is and throws an exception.