Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
3.0 RC3
-
None
-
None
-
Operating System: All
Platform: Other
-
35728
Description
Whenever I use getResponseBody or getResponseBodyAsString I get a warning in the
log that I shouldn't do this. Either deprecate these methods or accept that
there are valid usecases for using them and remove the warning.
In my case I usually get the response to do stuff with it in memory. That
usually requires having either a bytearray or a string (i.e. it is a design
choice, I accept the memory overhead). I suppose that's why these methods are
part of the API (and I suspect they are used frequently).
IMHO in general components like httpclient should always be silent and rely on
proper exception handling so that the user can decide whether to log exceptions,
errors, etc. It certainly shouldn't try to educate the programmer in through
logging messages.
Now I need to write code to avoid the log filling with useless warnings (my
customers hate noisy logs). I shouldn't have to that.
Attachments
Issue Links
- is duplicated by
-
HTTPCLIENT-604 Don't issue a warning when using getResponseBodyAsString
- Closed