When making a POST request, if the request.body is a ByteArray and the array is not at position 0 the request fails.
This looks to be because the Content-Length header is set based on the .length of the body, however during transport it expects there to be .length bytes of data after the current position. It would at least be worth a warning in the documentation for HttpRequest (or possibly changing the code to generate Content-Length using .bytesAvailable instead of .length?)
When making a POST request, if the request.body is a ByteArray and the array is not at position 0 the request fails.
This looks to be because the Content-Length header is set based on the .length of the body, however during transport it expects there to be .length bytes of data after the current position. It would at least be worth a warning in the documentation for HttpRequest (or possibly changing the code to generate Content-Length using .bytesAvailable instead of .length?)