public class HttpResponse extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
EXCEPTION
Exception thrown error code
|
static int |
UNKNOWN_REQUEST
Unknown request type error code
|
| 构造器和说明 |
|---|
HttpResponse(Exception e)
Initialize an exception thrown HttpResponse with e
|
HttpResponse(int code,
okhttp3.Headers headers,
String value)
Initialize a HttpResponse without exceptions
|
| 限定符和类型 | 方法和说明 |
|---|---|
@NotNull JSON |
getAsJSON()
Get the values as JSON instance
|
int |
getCode() |
@Nullable Exception |
getException() |
@Nullable okhttp3.Headers |
getHeaders() |
@Nullable String |
getResponse() |
boolean |
isError()
Indicate this is an exception thrown HttpResponse
|
static HttpResponse |
ofNull() |
public static final int UNKNOWN_REQUEST
public static final int EXCEPTION
public HttpResponse(Exception e)
e - the thrown exception in this http-request processingpublic HttpResponse(int code,
okhttp3.Headers headers,
String value)
code - the response codeheaders - the response headervalue - the response datapublic boolean isError()
public static HttpResponse ofNull()
@Nullable public @Nullable Exception getException()
public int getCode()
@NotNull public @NotNull JSON getAsJSON()
@Nullable public @Nullable String getResponse()
@Nullable public @Nullable okhttp3.Headers getHeaders()
Copyright © 2022. All rights reserved.