✅ Is this necessary?
If
using
disposes of everything inside of it, why is this still a thing?
Wont HttpResponseMessage
be disposed of once the client is finished anyway? o.O
Just wanting to understand it better, idk what other channels to use5 Replies
I've seen this around a few times when I was looking into how to use the HttpClient and am only know thinking about it, after learning a little more
HttpClient
could be (and should be) long lived
so you could have many HttpResponseMessage
sSeems so simple put like that... nvm then lol
ty
I think disposing of the HttpClient will not dispose the response messages it "generated". Disposing the response message in turn will dispose underlying streams it keeps open. But I think it's actually relatively rare you need to work at this level, because most of the higher level abstractions around HttpClient will handle this for you, and only return e.g. the string to be converted to json
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View