Class HttpContentResponse

    • Constructor Detail

      • HttpContentResponse

        public HttpContentResponse​(Response response,
                                   byte[] content,
                                   java.lang.String mediaType,
                                   java.lang.String encoding)
        Deprecated.
    • Method Detail

      • getRequest

        public Request getRequest()
        Deprecated.
        Specified by:
        getRequest in interface Response
        Returns:
        the request associated with this response
      • getVersion

        public HttpVersion getVersion()
        Deprecated.
        Specified by:
        getVersion in interface Response
        Returns:
        the HTTP version of this response, such as "HTTP/1.1"
      • getStatus

        public int getStatus()
        Deprecated.
        Specified by:
        getStatus in interface Response
        Returns:
        the HTTP status code of this response, such as 200 or 404
      • getHeaders

        public HttpFields getHeaders()
        Deprecated.
        Specified by:
        getHeaders in interface Response
        Returns:
        the headers of this response
      • abort

        public boolean abort​(java.lang.Throwable cause)
        Deprecated.
        Description copied from interface: Response
        Attempts to abort the receive of this response.
        Specified by:
        abort in interface Response
        Parameters:
        cause - the abort cause, must not be null
        Returns:
        whether the abort succeeded
      • getMediaType

        public java.lang.String getMediaType()
        Deprecated.
        Specified by:
        getMediaType in interface ContentResponse
        Returns:
        the media type of the content, such as "text/html" or "application/octet-stream"
      • getEncoding

        public java.lang.String getEncoding()
        Deprecated.
        Specified by:
        getEncoding in interface ContentResponse
        Returns:
        the encoding of the content, such as "UTF-8"
      • getContent

        public byte[] getContent()
        Deprecated.
        Specified by:
        getContent in interface ContentResponse
        Returns:
        the response content
      • getContentAsString

        public java.lang.String getContentAsString()
        Deprecated.
        Specified by:
        getContentAsString in interface ContentResponse
        Returns:
        the response content as a string, decoding the bytes using the charset provided by the Content-Type header, if any, or UTF-8.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object