Is your feature request related to a problem? Please describe.
Currently RequestBody can only be constructed from ByteBuffer. If a caller wants to supply data from an InputStream this API forces an allocation and copy of the data in the stream into an intermediate buffer.
Describe the solution you'd like
I would like to be able to create RequestBody from an InputStream. It seems that mark and reset functionality can be used to implement rewinding in RewindableContent.
Describe alternatives you've considered
I can use an intermediate buffer solution and it works but it's not ideal.
Is your feature request related to a problem? Please describe.
Currently
RequestBodycan only be constructed fromByteBuffer. If a caller wants to supply data from anInputStreamthis API forces an allocation and copy of the data in the stream into an intermediate buffer.Describe the solution you'd like
I would like to be able to create
RequestBodyfrom anInputStream. It seems thatmarkandresetfunctionality can be used to implement rewinding inRewindableContent.Describe alternatives you've considered
I can use an intermediate buffer solution and it works but it's not ideal.