Package org.jsoup

Interface Connection.Response

    • Method Detail

      • statusCode

        int statusCode()
        Get the status code of the response.
        Returns:
        status code
      • statusMessage

        String statusMessage()
        Get the status message of the response.
        Returns:
        status message
      • charset

        String charset()
        Get the character set name of the response, derived from the content-type header.
        Returns:
        character set name
      • charset

        Connection.Response charset​(String charset)
        Set / override the response character set. When the document body is parsed it will be with this charset.
        Parameters:
        charset - to decode body as
        Returns:
        this Response, for chaining
      • contentType

        String contentType()
        Get the response content type (e.g. "text/html");
        Returns:
        the response content type
      • body

        String body()
        Get the body of the response as a plain string.
        Returns:
        body
      • bodyAsBytes

        byte[] bodyAsBytes()
        Get the body of the response as an array of bytes.
        Returns:
        body bytes