public static interface

Connection.Response

implements Connection.Base<T extends Base>
org.jsoup.Connection.Response
Known Indirect Subclasses

Class Overview

Represents a HTTP response.

Summary

Public Methods
abstract String body()
Get the body of the response as a plain string.
abstract byte[] bodyAsBytes()
Get the body of the response as an array of bytes.
abstract String charset()
Get the character set name of the response.
abstract String contentType()
Get the response content type (e.g.
abstract Document parse()
Parse the body of the response as a Document.
abstract int statusCode()
Get the status code of the response.
abstract String statusMessage()
Get the status message of the response.
[Expand]
Inherited Methods
From interface org.jsoup.Connection.Base

Public Methods

public abstract String body ()

Get the body of the response as a plain string.

Returns
  • body

public abstract byte[] bodyAsBytes ()

Get the body of the response as an array of bytes.

Returns
  • body bytes

public abstract String charset ()

Get the character set name of the response.

Returns
  • character set name

public abstract String contentType ()

Get the response content type (e.g. "text/html");

Returns
  • the response content type

public abstract Document parse ()

Parse the body of the response as a Document.

Returns
  • a parsed Document
Throws
IOException on error

public abstract int statusCode ()

Get the status code of the response.

Returns
  • status code

public abstract String statusMessage ()

Get the status message of the response.

Returns
  • status message