Class DefaultResponse

  • All Implemented Interfaces:
    com.atlassian.httpclient.api.Message, com.atlassian.httpclient.api.Response

    public final class DefaultResponse
    extends Object
    implements com.atlassian.httpclient.api.Response
    • Constructor Detail

      • DefaultResponse

        public DefaultResponse​(Headers headers,
                               InputStream entityStream,
                               io.atlassian.fugue.Option<Long> maxEntitySize,
                               int statusCode,
                               String statusText)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Specified by:
        getStatusCode in interface com.atlassian.httpclient.api.Response
      • getStatusText

        public String getStatusText()
        Specified by:
        getStatusText in interface com.atlassian.httpclient.api.Response
      • isInformational

        public boolean isInformational()
        Specified by:
        isInformational in interface com.atlassian.httpclient.api.Response
      • isSuccessful

        public boolean isSuccessful()
        Specified by:
        isSuccessful in interface com.atlassian.httpclient.api.Response
      • isOk

        public boolean isOk()
        Specified by:
        isOk in interface com.atlassian.httpclient.api.Response
      • isCreated

        public boolean isCreated()
        Specified by:
        isCreated in interface com.atlassian.httpclient.api.Response
      • isNoContent

        public boolean isNoContent()
        Specified by:
        isNoContent in interface com.atlassian.httpclient.api.Response
      • isRedirection

        public boolean isRedirection()
        Specified by:
        isRedirection in interface com.atlassian.httpclient.api.Response
      • isSeeOther

        public boolean isSeeOther()
        Specified by:
        isSeeOther in interface com.atlassian.httpclient.api.Response
      • isNotModified

        public boolean isNotModified()
        Specified by:
        isNotModified in interface com.atlassian.httpclient.api.Response
      • isClientError

        public boolean isClientError()
        Specified by:
        isClientError in interface com.atlassian.httpclient.api.Response
      • isBadRequest

        public boolean isBadRequest()
        Specified by:
        isBadRequest in interface com.atlassian.httpclient.api.Response
      • isUnauthorized

        public boolean isUnauthorized()
        Specified by:
        isUnauthorized in interface com.atlassian.httpclient.api.Response
      • isForbidden

        public boolean isForbidden()
        Specified by:
        isForbidden in interface com.atlassian.httpclient.api.Response
      • isNotFound

        public boolean isNotFound()
        Specified by:
        isNotFound in interface com.atlassian.httpclient.api.Response
      • isConflict

        public boolean isConflict()
        Specified by:
        isConflict in interface com.atlassian.httpclient.api.Response
      • isServerError

        public boolean isServerError()
        Specified by:
        isServerError in interface com.atlassian.httpclient.api.Response
      • isInternalServerError

        public boolean isInternalServerError()
        Specified by:
        isInternalServerError in interface com.atlassian.httpclient.api.Response
      • isServiceUnavailable

        public boolean isServiceUnavailable()
        Specified by:
        isServiceUnavailable in interface com.atlassian.httpclient.api.Response
      • isError

        public boolean isError()
        Specified by:
        isError in interface com.atlassian.httpclient.api.Response
      • isNotSuccessful

        public boolean isNotSuccessful()
        Specified by:
        isNotSuccessful in interface com.atlassian.httpclient.api.Response
      • getContentLength

        public io.atlassian.fugue.Option<Long> getContentLength()
        Specified by:
        getContentLength in interface com.atlassian.httpclient.api.Message
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface com.atlassian.httpclient.api.Message
      • getContentCharset

        public String getContentCharset()
        Specified by:
        getContentCharset in interface com.atlassian.httpclient.api.Message
      • getAccept

        public String getAccept()
      • hasEntity

        public boolean hasEntity()
        Specified by:
        hasEntity in interface com.atlassian.httpclient.api.Message
      • hasReadEntity

        public boolean hasReadEntity()
        Specified by:
        hasReadEntity in interface com.atlassian.httpclient.api.Message
      • getHeaders

        public Map<String,​String> getHeaders()
        Specified by:
        getHeaders in interface com.atlassian.httpclient.api.Message
      • getHeader

        public String getHeader​(String name)
        Specified by:
        getHeader in interface com.atlassian.httpclient.api.Message
      • validate

        public com.atlassian.httpclient.api.Message validate()