Adds a couple of new <<* methods that take in a byte array as the source for the multipart file data. This complements the existing file and stream generator versions.
Setting the data from a byte array is a common use case when uploading images that have been manipulated or generated in scala code.
The ByteArrayBody used sets the Content-Length headers (similarly to the FileBody), this prevents problem when chunking large data submissions. I had problems with a squid proxy that was rejecting chunked requests when I set the data using the InputStream mechanism, using the ByteArrayBody and hence the content length data prevented this.
Adds ability to create a multipart post from a byte array.
The underlying ByteArrayBody correctly sets the content length which is
not set when using the inputStream generator approach.
thanks for the contribution!