BodyMode
BodyMode represents a choice between working lazily with streams or eagerly storing the body contents in memory.
This choice comes with the following trade-offs:
Memory does not require any special treatment. However, you need to be confident that the sum of all "in-flight" body bytes does not exceed your JVM heap. Otherwise, you'll run into `OutOfMemoryException's.
Stream, on the other hand, allows you to handle payloads of any size, but you'll need to make sure that:
You're consuming it only once and at the right place (harder to add "debugging" filters too).
It's always consumed, or
close()is called appropriately.