If I'm not mistaken, then the HttpOptions.TimeoutInSeconds are not working as expected right now because they are only used to create a policy which will let the HTTP request timeout after the specified timeout.
The HttpClient used for that request however also has a timeout which defaults to 100s. If the configured timeout is higher than that, then the request will timeout after 100 seconds and the configured timeout used in the policy will never be used.
I am not sure why we use this policy at all if the HttpClient already has a timeout. We should probably remove the timeout policy completely and instead just configure the timeout used for HttpClient.
We could also use this opportunity to refactor TimeoutInSeconds into a TimeSpan Timeout which would be more consistent with other such settings in .NET.
If I'm not mistaken, then the
HttpOptions.TimeoutInSecondsare not working as expected right now because they are only used to create a policy which will let the HTTP request timeout after the specified timeout.The
HttpClientused for that request however also has a timeout which defaults to100s. If the configured timeout is higher than that, then the request will timeout after 100 seconds and the configured timeout used in the policy will never be used.I am not sure why we use this policy at all if the
HttpClientalready has a timeout. We should probably remove the timeout policy completely and instead just configure the timeout used forHttpClient.We could also use this opportunity to refactor
TimeoutInSecondsinto aTimeSpanTimeoutwhich would be more consistent with other such settings in .NET.