Class CloudHttp.Response

java.lang.Object
com.ultikits.ultitools.utils.CloudHttp.Response
Enclosing class:
CloudHttp

static final class CloudHttp.Response extends Object
The result of one exchange. Carries no request header and no credential.
  • Field Details

    • outcome

      private final CloudHttp.Outcome outcome
    • status

      private final int status
    • body

      private final String body
    • retryAfterSeconds

      private final long retryAfterSeconds
  • Constructor Details

  • Method Details

    • withoutExchange

      private static CloudHttp.Response withoutExchange(CloudHttp.Outcome outcome)
    • outcome

      Returns:
      what happened; never null
    • status

      int status()
      Returns:
      the HTTP status, or -1 when no exchange completed
    • body

      String body()
      Returns:
      the response body as UTF-8 text, or null when no exchange completed
    • retryAfterSeconds

      long retryAfterSeconds()
      Returns:
      the Retry-After delay in seconds (0..3600), or -1 when absent or not in delta-seconds form
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the outcome and status only -- never the body or a header