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
If you now wait about 5 seconds, you'll eventually get:
Feb 03, 2022 1:57:15 PM okhttp3.internal.platform.Platform log
WARNING: A connection to https://www.google.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
If we made the default of #3 to parse as text, this likely wouldn't be a problem. We'd just need to document that if you are coercing the body to an input stream, the caller is responsible for properly closing it when they are done with it.
The text was updated successfully, but these errors were encountered:
I agree that support for text/* will lessen the likelihood of people running into this for simple use cases. I hope that most people know that when they are handed a stream it is their responsibility to close it, but we can certainly document that fact too. :)
If I use the client in an idiomatic way (or at least in my mind) such as just getting the status to a GET request to https://google.com :
If you now wait about 5 seconds, you'll eventually get:
If we made the default of #3 to parse as text, this likely wouldn't be a problem. We'd just need to document that if you are coercing the body to an input stream, the caller is responsible for properly closing it when they are done with it.
The text was updated successfully, but these errors were encountered: