Closed
Description
Version: 7.9.1
Problem
When Response.getContent()
is getting called I am always receiving an empty string
Steps to Reproduce
I forked the repo and made a test to expose the problem:
https://github.com/born2snipe/twilio-java/tree/reading-content-always-returning-empty-string
Possible fix
In the Response.getContent()
stop checking the available()
on the InputStream
since it is considered an estimate number of bytes available. Instead, just consume the bytes and store the read bytes into a ByteArrayOutputStream
and convert the contents to a String
.
Metadata
Metadata
Assignees
Labels
No labels