public final class HttpResponse<T>
extends java.lang.Object
构造器和说明 |
---|
HttpResponse(HttpRequest<T> request,
okhttp3.Response response) |
限定符和类型 | 方法和说明 |
---|---|
byte[] |
bytes() |
java.io.InputStream |
byteStream() |
static void |
checkResponseSuccessful(HttpResponse response) |
int |
code() |
long |
contentLength() |
java.lang.String |
header(java.lang.String name) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
headers() |
boolean |
isSuccessful() |
java.lang.String |
message() |
HttpRequest<T> |
request() |
java.lang.String |
string() |
java.lang.String |
toString()
Returns a string representation of the object.
|
public HttpResponse(HttpRequest<T> request, okhttp3.Response response)
public HttpRequest<T> request()
public int code()
public java.lang.String message()
public java.lang.String header(java.lang.String name)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers()
public final long contentLength()
public final java.io.InputStream byteStream()
public final byte[] bytes() throws java.io.IOException
java.io.IOException
public final java.lang.String string() throws java.io.IOException
java.io.IOException
public final boolean isSuccessful()
public static void checkResponseSuccessful(HttpResponse response) throws QCloudServiceException
public java.lang.String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
在类中 java.lang.Object