Using StringBuilder instead of creating a new String with each append. This reduces the complexity of readResponse() from O(n^2) to O(n).