4 ms·
And yet there is dangerous usage of HttpClient (in parent defense the situation is a mess)
by whaleofatw2022 3y ago
And yet there is dangerous usage of HttpClient (in parent defense the situation is a mess)
- neonsunset 3y agoHttpClient is thread-safe. The above use case, while not ideal, will work perfectly fine in 95% of situations. (Of course, the "right" way to use HttpClient is to have it be injected via DI or retrieved from IHttpClientFactory, but if all you are doing is writing a script-like CLI utility, there is no advantage to that)