Package com.ultikits.ultitools.utils
Class CloudHttp.Response
java.lang.Object
com.ultikits.ultitools.utils.CloudHttp.Response
- Enclosing class:
CloudHttp
The result of one exchange. Carries no request header and no credential.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final CloudHttp.Outcomeprivate final longprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateResponse(CloudHttp.Outcome outcome, int status, String body, long retryAfterSeconds) -
Method Summary
Modifier and TypeMethodDescription(package private) Stringbody()(package private) CloudHttp.Outcomeoutcome()(package private) long(package private) intstatus()toString()private static CloudHttp.ResponsewithoutExchange(CloudHttp.Outcome outcome)
-
Field Details
-
outcome
-
status
private final int status -
body
-
retryAfterSeconds
private final long retryAfterSeconds
-
-
Constructor Details
-
Response
-
-
Method Details
-
withoutExchange
-
outcome
CloudHttp.Outcome outcome()- Returns:
- what happened; never
null
-
status
int status()- Returns:
- the HTTP status, or
-1when no exchange completed
-
body
String body()- Returns:
- the response body as UTF-8 text, or
nullwhen no exchange completed
-
retryAfterSeconds
long retryAfterSeconds()- Returns:
- the
Retry-Afterdelay in seconds (0..3600), or-1when absent or not in delta-seconds form
-
toString
-