Open vincentjames501 opened 2 years ago
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. :)
@RutledgePaulV , I posted my thoughts here: https://github.com/RutledgePaulV/clj-okhttp/issues/3#issuecomment-1030745224
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.