You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert back to new HttpClient instance per request
Move back to creating a new HttpClient instance per request for
few reasons:
- The current code/pattern was broken - we were double disposing of
the singleton client instance.
- It makes setting headers slightly easier as the caller no longer
must create request message with the headers set manually - just
set the default headers on their exclusive client.
In practice we're not going to be running for a long time, and we're
not going to be making many requests, which would otherwise drain all
the available network ports.
If the individual providers wish to obtain a new HttpClient instance
and reuse it for all their web calls, they are free to do so.
0 commit comments