public <T> T parseAs(Class<T> dataClass) throws IOException {
HttpParser parser = getParser();
if (parser == null) {
InputStream content = getContent(); <-- !!!!!!!! THIS WON"T BE NULL FOR EMPTY RESPONSE WHEN NetHttpTransport is USED. WORKS FINE FOR ApacheHttpTransport !!!!!!!
if (contentType == null) {
if (content != null) {
throw new IllegalArgumentException(
"Missing Content-Type header in response: " + parseAsString());
}
return null;
}
throw new IllegalArgumentException("No parser defined for Content-Type: " + contentType);
}
return parser.parse(this, dataClass);
}
Original issue reported on code.google.com by alexey.v...@gmail.com on 24 Sep 2011 at 9:14
Original issue reported on code.google.com by
alexey.v...@gmail.com
on 24 Sep 2011 at 9:14