public static class HttpSender.Response
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NO_RESPONSE_BODY |
Constructor and Description |
---|
Response(int code,
java.lang.String body) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
body() |
int |
code() |
boolean |
isSuccessful() |
HttpSender.Response |
onError(java.util.function.Consumer<HttpSender.Response> onError) |
HttpSender.Response |
onSuccess(java.util.function.Consumer<HttpSender.Response> onSuccess) |
public static final java.lang.String NO_RESPONSE_BODY
public Response(int code, @Nullable java.lang.String body)
public int code()
public java.lang.String body()
public HttpSender.Response onSuccess(java.util.function.Consumer<HttpSender.Response> onSuccess)
public HttpSender.Response onError(java.util.function.Consumer<HttpSender.Response> onError)
public boolean isSuccessful()