public abstract class HttpResponse extends Object
| Constructor and Description |
|---|
HttpResponse(HttpClientConfiguration conf) |
| Modifier and Type | Method and Description |
|---|---|
JSONArray |
asJSONArray()
Returns the response body as twitter4j.internal.org.json.JSONArray.
Disconnects the internal HttpURLConnection silently. |
JSONObject |
asJSONObject()
Returns the response body as twitter4j.internal.org.json.JSONObject.
Disconnects the internal HttpURLConnection silently. |
Reader |
asReader() |
InputStream |
asStream()
Returns the response stream.
This method cannot be called after calling asString() or asDcoument() It is suggested to call disconnect() after consuming the stream. |
String |
asString()
Returns the response body as string.
Disconnects the internal HttpURLConnection silently. |
abstract void |
disconnect() |
abstract String |
getResponseHeader(String name) |
abstract Map<String,List<String>> |
getResponseHeaderFields() |
int |
getStatusCode() |
String |
toString() |
public HttpResponse(HttpClientConfiguration conf)
public int getStatusCode()
public InputStream asStream()
TwitterExceptiondisconnect()public String asString() throws TwitterException
TwitterExceptionpublic JSONObject asJSONObject() throws TwitterException
TwitterExceptionpublic JSONArray asJSONArray() throws TwitterException
TwitterExceptionpublic Reader asReader()
public abstract void disconnect()
throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.