Uses of Interface
org.jsoup.Connection
Package
Description
Contains the main
Jsoup
class, which provides convenient static access to the jsoup functionality.
Package containing classes supporting the core jsoup code.
HTML document structure nodes.
-
Uses of Connection in org.jsoup
Modifier and TypeMethodDescriptiondefault Connection
Connection.auth
(@Nullable RequestAuthenticator authenticator) Set the authenticator to use for this connection, enabling requests to URLs, and via proxies, that require authentication credentials.static Connection
Jsoup.connect
(String url) Creates a newConnection
(session), with the defined request URL.Connection.cookie
(String name, String value) Set a cookie to be sent in the request.Connection.cookies
(Map<String, String> cookies) Adds each of the supplied cookies to the request.Connection.cookieStore
(CookieStore cookieStore) Provide a custom or pre-filled CookieStore to be used on requests made by this Connection.Connection.data
(String... keyvals) Add one or more requestkey, val
data parameter pairs.Connection.data
(String key, String value) Add a request data parameter.Connection.data
(String key, String filename, InputStream inputStream) Add an input stream as a request data parameter.Connection.data
(String key, String filename, InputStream inputStream, String contentType) Add an input stream as a request data parameter.Connection.data
(Collection<Connection.KeyVal> data) Adds all of the supplied data to the request data parametersConnection.data
(Map<String, String> data) Adds all of the supplied data to the request data parametersConnection.followRedirects
(boolean followRedirects) Configures the connection to (not) follow server redirects.Connection.header
(String name, String value) Set a request header.Connection.headers
(Map<String, String> headers) Sets each of the supplied headers on the request.Connection.ignoreContentType
(boolean ignoreContentType) Ignore the document's Content-Type when parsing the response.Connection.ignoreHttpErrors
(boolean ignoreHttpErrors) Configures the connection to not throw exceptions when an HTTP error occurs. (4xx - 5xx, e.g. 404 or 500).Connection.maxBodySize
(int bytes) Set the maximum bytes to read from the (uncompressed) connection into the body, before the connection is closed, and the input truncated (i.e. the body content will be trimmed).Connection.method
(Connection.Method method) Set the request method to use, GET or POST.Connection.newRequest()
Creates a new request, using this Connection as the session-state and to initialize the connection settings (which may then be independently changed on the returnedConnection.Request
object).default Connection
Connection.newRequest
(String url) Creates a new request, using this Connection as the session-state and to initialize the connection settings (which may then be independently changed on the returnedConnection.Request
object).default Connection
Connection.newRequest
(URL url) Creates a new request, using this Connection as the session-state and to initialize the connection settings (which may then be independently changed on the returnedConnection.Request
object).static Connection
Jsoup.newSession()
Creates a newConnection
to use as a session.default Connection
Connection.onResponseProgress
(Progress<Connection.Response> handler) Set the response progress handler, which will be called periodically as the response body is downloaded.Provide a specific parser to use when parsing the response to a Document.Connection.postDataCharset
(String charset) Set the character-set used to encode for x-www-form-urlencoded post data.Connection.proxy
(String host, int port) Set the HTTP proxy to use for this request.Set the proxy to use for this request.Connection.referrer
(String referrer) Set the request referrer (aka "referer") header.Connection.request
(Connection.Request request) Set the connection's requestConnection.requestBody
(String body) Set a POST (or PUT) request body.Connection.response
(Connection.Response response) Set the connection's responseConnection.sslSocketFactory
(SSLSocketFactory sslSocketFactory) Set custom SSL socket factoryConnection.timeout
(int millis) Set the total request timeout duration.Connection.url
(String url) Set the request URL to fetch.Set the request URL to fetch.Connection.userAgent
(String userAgent) Set the request user-agent header. -
Uses of Connection in org.jsoup.helper
Modifier and TypeMethodDescriptionHttpConnection.auth
(RequestAuthenticator authenticator) static Connection
HttpConnection.connect
(String url) Create a new Connection, with the request URL specified.static Connection
Create a new Connection, with the request URL specified.HttpConnection.cookie
(String name, String value) HttpConnection.cookies
(Map<String, String> cookies) HttpConnection.cookieStore
(CookieStore cookieStore) HttpConnection.data
(String... keyvals) HttpConnection.data
(String key, String value) HttpConnection.data
(String key, String filename, InputStream inputStream) HttpConnection.data
(String key, String filename, InputStream inputStream, String contentType) HttpConnection.data
(Collection<Connection.KeyVal> data) HttpConnection.data
(Map<String, String> data) HttpConnection.followRedirects
(boolean followRedirects) HttpConnection.header
(String name, String value) HttpConnection.headers
(Map<String, String> headers) HttpConnection.ignoreContentType
(boolean ignoreContentType) HttpConnection.ignoreHttpErrors
(boolean ignoreHttpErrors) HttpConnection.maxBodySize
(int bytes) HttpConnection.method
(Connection.Method method) HttpConnection.newRequest()
HttpConnection.onResponseProgress
(Progress<Connection.Response> handler) HttpConnection.postDataCharset
(String charset) HttpConnection.proxy
(String host, int port) HttpConnection.referrer
(String referrer) HttpConnection.request
(Connection.Request request) HttpConnection.requestBody
(String body) HttpConnection.response
(Connection.Response response) HttpConnection.sslSocketFactory
(SSLSocketFactory sslSocketFactory) HttpConnection.timeout
(int millis) HttpConnection.url
(String url) HttpConnection.userAgent
(String userAgent) -
Uses of Connection in org.jsoup.nodes
Modifier and TypeMethodDescriptionDocument.connection()
Returns the Connection (Request/Response) object that was used to fetch this document, if any; otherwise, a new default Connection object.FormElement.submit()
Prepare to submit this form.Modifier and TypeMethodDescriptionDocument.connection
(Connection connection) Set the Connection used to fetch this document.